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

Issue 16005007: Mobile Gmail should use 220 kB less memory (Closed)

Created:
7 years, 6 months ago by abarth-chromium
Modified:
7 years, 6 months ago
Reviewers:
eseidel
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Mobile Gmail should use 220 kB less memory The HTML parser breaks up large text nodes into small chunks to avoid some O(n^2) editing algorithms. This CL skips that workaround for <script> and <style> elements, which aren't likely to need editing. As a result, <script> ends up with a single text node, containing a contiguous String, which is the source code of that inline script block. When we go to execute an inline script, we collect up all the text node children of the <script> element into a single monolithic string. That string then ends up in V8, where it can be retained (e.g., in the compilation cache). Prior this CL, we could end up with two copies of large inline scripts: one monolithic string retained by V8 and a number of shards retained by the DOM. After this CL, both the DOM and V8 use the same monolithic string, removing a copy. Mobile Gmail has a 220 kB inline script, which now is shared between V8 and the DOM, saving memory. Separately, we should investigate whether we can remove the length limit entirely. It's possible that the O(n^2) editing algorithms have been removed for other reasons. R=eseidel Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151717

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -6 lines) Patch
M Source/core/dom/Text.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLConstructionSite.cpp View 4 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
abarth-chromium
7 years, 6 months ago (2013-06-04 00:38:41 UTC) #1
eseidel
lgtm Hopefully we'll remove this limit everywhere some day soon. From re-reading the WebKit bug ...
7 years, 6 months ago (2013-06-04 00:39:51 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/16005007/1
7 years, 6 months ago (2013-06-04 00:39:56 UTC) #3
commit-bot: I haz the power
7 years, 6 months ago (2013-06-04 03:11:31 UTC) #4
Message was sent while issue was closed.
Change committed as 151717

Powered by Google App Engine
This is Rietveld 408576698