Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 24043003: SerializedScriptValue's Writer calls realloc a lot (Closed)

Created:
7 years, 3 months ago by abarth-chromium
Modified:
7 years, 3 months ago
Reviewers:
jsbell
CC:
blink-reviews, Nils Barth (inactive), kojih, loislo+blink_chromium.org, jsbell+bindings_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, adamk+blink_chromium.org, haraken, Nate Chapin, jeez, do-not-use
Visibility:
Public.

Description

SerializedScriptValue's Writer calls realloc a lot Currently SerializedScriptValue's Writer is resizing its StringBuffer to the exact size it needs for every object it writes into the buffer. Instead, it should grow the buffer exponentially to avoid calling realloc so many times. This CL fixes a regression from Blink@155225. I've also removed a call to isolatedCopy which is unnecessary. R=jsbell@chromium.org BUG=266837 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157388

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -12 lines) Patch
M Source/bindings/v8/SerializedScriptValue.cpp View 8 chunks +22 lines, -11 lines 0 comments Download
M Source/wtf/text/StringBuffer.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
abarth-chromium
7 years, 3 months ago (2013-09-06 18:59:09 UTC) #1
jsbell
lgtm
7 years, 3 months ago (2013-09-06 20:06:54 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/24043003/1
7 years, 3 months ago (2013-09-06 20:13:48 UTC) #3
commit-bot: I haz the power
7 years, 3 months ago (2013-09-06 21:27:17 UTC) #4
Message was sent while issue was closed.
Change committed as 157388

Powered by Google App Engine
This is Rietveld 408576698