[webkit-dev] improving String::append()

Adam Barth abarth at webkit.org
Thu Dec 3 09:25:16 PST 2009

I think we have a StringBuilder class that is optimized for building
string incrementally.  Other code uses Vector<UChar> and
String::adopt.  Maybe we should optimize the hot spots instead of
changing Strings everywhere?


On Thu, Dec 3, 2009 at 8:32 AM, Zoltan Herczeg <zherczeg at inf.u-szeged.hu> wrote:
> Hi,
> according to my measurements, a large chunk of WebKit memory consumption
> comes from WebCore::TextResourceDecoder::decode
> (loader/TextResourceDecoder.cpp:818) which calls String::append
> (String.cpp:82). The comment there says:
>  // FIXME: This is extremely inefficient.
> I would volunteer to rewrite the code (especially reducing the memory
> consumption), but first, I would like to hear your opinion how can we make
> the string handling of WebKit better.
> Zoltan
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

More information about the webkit-dev mailing list