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

Issue 1405573003: Introduce StringImpl::createPreallocatedStatic (Closed)

Created:
5 years, 2 months ago by tzik
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-wtf_chromium.org, chromium-reviews, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce StringImpl::createPreallocatedStatic This CL adds StringImpl::createPreallocatedStatic and replaces all of existing usage of StringImpl::createStatic with the new one. In blink initialization phase, CoreInitializer::init() creates more than 500 of StringImpl with StringImpl::createStatic, which allocates new buffers and copy string literals into them. That costs around 3.1ms of renderer startup time on Nexus 4. OTOH, StringImpl::createPreallocatedStatic reuses the static storage for string literals without allocating extra buffer. That reduces CoreInitializer::init() time to 1.8ms. BUG=

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : +comment. Removed StringImpl::createStatic. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -40 lines) Patch
M third_party/WebKit/Source/build/scripts/make_names.py View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/make_qualified_names.py View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl View 1 2 3 1 chunk +9 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl View 1 2 3 3 chunks +15 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 2 3 2 chunks +7 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringStatics.cpp View 1 2 3 1 chunk +28 lines, -8 lines 0 comments Download

Messages

Total messages: 23 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405573003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405573003/20001
5 years, 2 months ago (2015-10-15 11:44:32 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/117444)
5 years, 2 months ago (2015-10-15 12:26:31 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405573003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405573003/40001
5 years, 2 months ago (2015-10-15 13:40:05 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-15 15:15:03 UTC) #9
kouhei (in TOK)
non-OWNER lgtm https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/wtf/text/StringImpl.cpp File third_party/WebKit/Source/wtf/text/StringImpl.cpp (right): https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/wtf/text/StringImpl.cpp#newcode357 third_party/WebKit/Source/wtf/text/StringImpl.cpp:357: return it->value; Are we ever going to ...
5 years, 2 months ago (2015-10-21 01:08:17 UTC) #11
tkent
Can we remove StringImpl::createStatic? https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl (right): https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl#newcode32 third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl:32: char string_impl_storage[sizeof(StringImpl)]; * Need a ...
5 years, 2 months ago (2015-10-21 03:19:34 UTC) #12
Daniel Bratell
https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl (right): https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl#newcode32 third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl:32: char string_impl_storage[sizeof(StringImpl)]; This looks like it could make the ...
5 years, 2 months ago (2015-10-21 09:51:25 UTC) #14
Daniel Bratell
On 2015/10/21 09:51:25, Daniel Bratell wrote: > https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl > File third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl > (right): > > ...
5 years, 2 months ago (2015-10-22 08:09:15 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405573003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405573003/60001
5 years, 1 month ago (2015-10-28 14:33:01 UTC) #18
tzik
Updated. PTAL. https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl (right): https://codereview.chromium.org/1405573003/diff/40001/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl#newcode32 third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl:32: char string_impl_storage[sizeof(StringImpl)]; On 2015/10/21 03:19:33, tkent wrote: ...
5 years, 1 month ago (2015-10-28 14:33:31 UTC) #19
tzik
On 2015/10/22 08:09:15, Daniel Bratell wrote: > On 2015/10/21 09:51:25, Daniel Bratell wrote: > > ...
5 years, 1 month ago (2015-10-28 14:34:06 UTC) #20
Daniel Bratell
On 2015/10/28 14:34:06, tzik wrote: > Which binary did you measure? For my local measurement, ...
5 years, 1 month ago (2015-10-28 14:47:37 UTC) #21
commit-bot: I haz the power
5 years, 1 month ago (2015-10-28 15:20:09 UTC) #23
Dry run: Try jobs failed on following builders:
  linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED,
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
  win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED,
http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)

Powered by Google App Engine
This is Rietveld 408576698