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

Issue 1583263002: Experimental CompressibleString UMA (Closed)

Created:
4 years, 11 months ago by hajimehoshi
Modified:
4 years, 11 months ago
Reviewers:
haraken, Ilya Sherman, tasak
CC:
chromium-reviews, eae+blinkwatch, apavlov+blink_chromium.org, kinuko+watch, blink-reviews-wtf_chromium.org, rwlbuis, caseq+blink_chromium.org, pfeldman+blink_chromium.org, blink-reviews-html_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, blink-reviews, sof, timvolodine, lushnikov+blink_chromium.org, loading-reviews+fetch_chromium.org, Nate Chapin, tyoshino+watch_chromium.org, mlamouri+watch-blink_chromium.org, mvanouwerkerk+watch_chromium.org, sergeyv+blink_chromium.org, Mikhail, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Experimental CompressibleString UMA This CL replaces String/AtomicString objects for JavaScript source strings with CompressibleString. CompressibleString introduced by this CL is a mock and just records UMA. CompressibleString has compress/decompress methods but does not actual compression/decompression. We're trying to experiment with this CL to judge if we can introduce actual compression algorithm. The new UMA Memory.CompressibleStringCount records the frequency with which JavaScirpt source strings are compressed and decompressed in foreground and background tabs. If decompressing in background doesn't occur often compared to compressing in background, we would be able to say decompressing would be effective to reduce memory. BUG=574317 Committed: https://crrev.com/e46533afc22085c91b2ee05102c90208b029d6a9 Cr-Commit-Position: refs/heads/master@{#370693}

Patch Set 1 #

Patch Set 2 : #

Total comments: 66

Patch Set 3 : haraken's review #

Patch Set 4 : Add DecompressingInForegroundTab #

Total comments: 37

Patch Set 5 : (rebasing) #

Patch Set 6 : haraken's review #

Total comments: 8

Patch Set 7 : isherman's review; Move CompressibleStringTable initialization #

Patch Set 8 : (rebasing) #

Patch Set 9 : Use only the main thread #

Patch Set 10 : Adopt lazy-initializing way #

Unified diffs Side-by-side diffs Delta from patch set Stats (+587 lines, -32 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Binding.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8StringResource.h View 1 2 5 chunks +88 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp View 1 2 2 chunks +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ValueCache.h View 1 2 4 chunks +43 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp View 1 2 3 4 5 4 chunks +81 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.cpp View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/Page.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/Page.cpp View 1 2 3 4 5 5 chunks +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/text/CompressibleString.h View 1 2 3 4 5 6 7 8 9 1 chunk +122 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/text/CompressibleString.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +134 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/WTFThreadData.h View 1 2 3 4 5 6 7 2 chunks +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/WTFThreadData.cpp View 2 chunks +6 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 2 chunks +19 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 51 (19 generated)
hajimehoshi
PTAL
4 years, 11 months ago (2016-01-15 11:01:41 UTC) #3
haraken
https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h File third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h (right): https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h#newcode62 third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h:62: bool isEmpty() const { return isNull() || m_source.isEmpty(); } ...
4 years, 11 months ago (2016-01-15 12:46:22 UTC) #4
hajimehoshi
Thank you! https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h File third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h (right): https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h#newcode62 third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h:62: bool isEmpty() const { return isNull() || ...
4 years, 11 months ago (2016-01-18 09:42:28 UTC) #5
haraken
https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/platform/text/CompressibleString.cpp File third_party/WebKit/Source/platform/text/CompressibleString.cpp (right): https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/platform/text/CompressibleString.cpp#newcode157 third_party/WebKit/Source/platform/text/CompressibleString.cpp:157: if (s_isPageBackground) Makes sense. Can we also introduce: else ...
4 years, 11 months ago (2016-01-18 09:58:25 UTC) #6
hajimehoshi
https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/platform/text/CompressibleString.cpp File third_party/WebKit/Source/platform/text/CompressibleString.cpp (right): https://codereview.chromium.org/1583263002/diff/20001/third_party/WebKit/Source/platform/text/CompressibleString.cpp#newcode157 third_party/WebKit/Source/platform/text/CompressibleString.cpp:157: if (s_isPageBackground) On 2016/01/18 09:58:25, haraken wrote: > > ...
4 years, 11 months ago (2016-01-18 10:31:51 UTC) #7
haraken
https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp File third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp (right): https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp#newcode189 third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp:189: m_lastStringImpl = stringImpl; Previously I mentioned that it would ...
4 years, 11 months ago (2016-01-18 17:23:37 UTC) #8
hajimehoshi
https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp File third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp (right): https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp#newcode189 third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp:189: m_lastStringImpl = stringImpl; On 2016/01/18 17:23:37, haraken wrote: > ...
4 years, 11 months ago (2016-01-19 06:03:38 UTC) #9
hajimehoshi
https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp File third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp (right): https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp#newcode189 third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp:189: m_lastStringImpl = stringImpl; On 2016/01/18 17:23:37, haraken wrote: > ...
4 years, 11 months ago (2016-01-19 06:21:39 UTC) #10
haraken
On 2016/01/19 06:21:39, hajimehoshi wrote: > https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp > File third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp (right): > > https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp#newcode189 > ...
4 years, 11 months ago (2016-01-19 06:26:11 UTC) #11
hajimehoshi
On 2016/01/19 06:26:11, haraken wrote: > On 2016/01/19 06:21:39, hajimehoshi wrote: > > > https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp ...
4 years, 11 months ago (2016-01-19 06:34:40 UTC) #12
haraken
On 2016/01/19 06:34:40, hajimehoshi wrote: > On 2016/01/19 06:26:11, haraken wrote: > > On 2016/01/19 ...
4 years, 11 months ago (2016-01-19 06:47:27 UTC) #13
hajimehoshi
On 2016/01/19 06:47:27, haraken wrote: > On 2016/01/19 06:34:40, hajimehoshi wrote: > > On 2016/01/19 ...
4 years, 11 months ago (2016-01-19 07:00:54 UTC) #14
haraken
On 2016/01/19 07:00:54, hajimehoshi wrote: > On 2016/01/19 06:47:27, haraken wrote: > > On 2016/01/19 ...
4 years, 11 months ago (2016-01-19 07:43:25 UTC) #15
haraken
LGTM with nits. https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp (right): https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp#newcode90 third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp:90: m_source = CompressibleString(StringImpl::empty()); CompressibleString() ? https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8ValueCache.cpp ...
4 years, 11 months ago (2016-01-19 07:43:36 UTC) #16
hajimehoshi
+isherman PTAL at histograms.xml
4 years, 11 months ago (2016-01-19 08:08:35 UTC) #18
hajimehoshi
Thank you! https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp (right): https://codereview.chromium.org/1583263002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp#newcode90 third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp:90: m_source = CompressibleString(StringImpl::empty()); On 2016/01/19 07:43:35, haraken ...
4 years, 11 months ago (2016-01-19 10:19:21 UTC) #19
Ilya Sherman
https://codereview.chromium.org/1583263002/diff/100001/third_party/WebKit/Source/platform/text/CompressibleString.cpp File third_party/WebKit/Source/platform/text/CompressibleString.cpp (right): https://codereview.chromium.org/1583263002/diff/100001/third_party/WebKit/Source/platform/text/CompressibleString.cpp#newcode122 third_party/WebKit/Source/platform/text/CompressibleString.cpp:122: Platform::current()->histogramCustomCounts(histogramName(), StringWasCompressedInBackgroundTab, 0, 10000, 50); nit: I'd recommend have ...
4 years, 11 months ago (2016-01-20 01:42:39 UTC) #20
hajimehoshi
Thank you! https://codereview.chromium.org/1583263002/diff/100001/third_party/WebKit/Source/platform/exported/Platform.cpp File third_party/WebKit/Source/platform/exported/Platform.cpp (right): https://codereview.chromium.org/1583263002/diff/100001/third_party/WebKit/Source/platform/exported/Platform.cpp#newcode55 third_party/WebKit/Source/platform/exported/Platform.cpp:55: initializeCompressibleStringTable(); Oops, WTF::Partitions is not initialized then. ...
4 years, 11 months ago (2016-01-20 10:17:17 UTC) #23
Ilya Sherman
LGTM, thanks.
4 years, 11 months ago (2016-01-20 19:59:11 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583263002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583263002/120001
4 years, 11 months ago (2016-01-21 02:27:17 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/11418)
4 years, 11 months ago (2016-01-21 03:26:45 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583263002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583263002/140001
4 years, 11 months ago (2016-01-21 07:03:14 UTC) #35
hajimehoshi
Hmm, I wasn't able to reproduce layout-test failures on my local machine...
4 years, 11 months ago (2016-01-21 07:58:02 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/162327)
4 years, 11 months ago (2016-01-21 08:49:13 UTC) #38
hajimehoshi
+tasak (Thanks to tasak-san, we were able to find that CompressbileString was touched on a ...
4 years, 11 months ago (2016-01-21 10:19:34 UTC) #40
haraken
On 2016/01/21 10:19:34, hajimehoshi wrote: > +tasak (Thanks to tasak-san, we were able to find ...
4 years, 11 months ago (2016-01-21 10:24:35 UTC) #41
hajimehoshi
On 2016/01/21 10:24:35, haraken wrote: > On 2016/01/21 10:19:34, hajimehoshi wrote: > > +tasak (Thanks ...
4 years, 11 months ago (2016-01-21 10:33:23 UTC) #42
hajimehoshi
On 2016/01/21 10:33:23, hajimehoshi wrote: > On 2016/01/21 10:24:35, haraken wrote: > > On 2016/01/21 ...
4 years, 11 months ago (2016-01-21 10:41:25 UTC) #43
haraken
On 2016/01/21 10:41:25, hajimehoshi wrote: > On 2016/01/21 10:33:23, hajimehoshi wrote: > > On 2016/01/21 ...
4 years, 11 months ago (2016-01-21 10:57:51 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583263002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583263002/180001
4 years, 11 months ago (2016-01-21 11:06:17 UTC) #47
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 11 months ago (2016-01-21 14:24:56 UTC) #49
commit-bot: I haz the power
4 years, 11 months ago (2016-01-21 14:25:52 UTC) #51
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/e46533afc22085c91b2ee05102c90208b029d6a9
Cr-Commit-Position: refs/heads/master@{#370693}

Powered by Google App Engine
This is Rietveld 408576698