[webkit-reviews] review requested: [Bug 25779] Allow Strings to be created with one malloc node with no copying : [Attachment 30639] Additional changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 24 21:04:08 PDT 2009


Dave Moore <davemoore at google.com> has asked  for review:
Bug 25779: Allow Strings to be created with one malloc node with no copying
https://bugs.webkit.org/show_bug.cgi?id=25779

Attachment 30639: Additional changes
https://bugs.webkit.org/attachment.cgi?id=30639&action=review

------- Additional Comments from Dave Moore <davemoore at google.com>
This patch changes many of the uses of adopt() to createUninitialized(). Most
are just straight-forward wins. A couple are places where we walk through a
list of nodes and extract the strings from them. These used to build up the
string incrementally, appending to a buffer. Now I walk through the list twice,
the first to discover the total length and the second to write the string into
the inline buffer. I think it's worth the second navigation to keep everything
in one malloc node.

In places where the logic was somewhat complicated as to the creation of the to
be adopted buffer I left it as it was.

I haven't yet done the automatic inlining of small adopted buffers. I'm not
sure what the right size is, at which it would be worth the extra copy.


More information about the webkit-reviews mailing list