[Webkit-unassigned] [Bug 25779] Allow Strings to be created with one malloc node with no copying

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


https://bugs.webkit.org/show_bug.cgi?id=25779


davemoore at google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #30639|                            |review?
               Flag|                            |




------- Comment #12 from davemoore at google.com  2009-05-24 21:04 PDT -------
Created an attachment (id=30639)
 --> (https://bugs.webkit.org/attachment.cgi?id=30639&action=view)
Additional changes

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.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list