[webkit-reviews] review requested: [Bug 29909] [V8] Chromium's implementation of ScriptString is awful for XHR's responseText : [Attachment 41195] Implementation using v8::String::Concat() for operator+=

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


James Robinson <jamesr at chromium.org> has asked	for review:
Bug 29909: [V8] Chromium's implementation of ScriptString is awful for XHR's
responseText
https://bugs.webkit.org/show_bug.cgi?id=29909

Attachment 41195: Implementation using v8::String::Concat() for operator+=
https://bugs.webkit.org/attachment.cgi?id=41195&action=review

------- Additional Comments from James Robinson <jamesr at chromium.org>
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!


More information about the webkit-reviews mailing list