[Webkit-unassigned] [Bug 29909] [V8] Chromium's implementation of ScriptString is awful for XHR's responseText

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 14 17:04:46 PDT 2009


James Robinson <jamesr at chromium.org> changed:

           What    |Removed                     |Added
  Attachment #41195|                            |review?, commit-queue-
               Flag|                            |
  Attachment #40834|0                           |1
        is obsolete|                            |

--- Comment #10 from James Robinson <jamesr at chromium.org>  2009-10-14 17:04:44 PDT ---
Created an attachment (id=41195)
 --> (https://bugs.webkit.org/attachment.cgi?id=41195)
Implementation using v8::String::Concat() for operator+=

This is a different approach that uses a new V8 interface to build up the
string.  It's significantly better than the the 'pure' C++ approach since V8 is
smart enough to not flatten the string until it is truly necessary.  On a test
page that downloads a 10MB data file via XHR and queries the
responseText.length attribute on every readystatechange event, Chromium with
this patch uses on the order of 10x less peak memory and builds up the
responseText on the order of 20x times faster.  This is an extreme case but I
think it's always a real improvement.

Since this patch depends on a V8 interface (v8::String::Concat) that has not
yet migrated in Chromium's DEPS file, it will break the Chromium build if
checked in right now so I've marked this patch cq-.  I would still appreciate
feedback while waiting for the V8 DEPS roll and will update the patch once it
is safe to land.  Thanks!

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

More information about the webkit-unassigned mailing list