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

Issue 1363653006: Reserve capacity for static strings HashMap. (Closed)

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

Description

Reserve capacity for static strings HashMap. The CoreInitialier and ModulesInitializer classes and now reserve the static strings HashMap capacity beforehand reducing the unneeded table re-creation and re-hashing of the contained elements at start up. This patch also moves reservation capacity for QualifiedNames to CoreInitialier so that all the static strings initialization logic is encapsulated there. Committed: https://crrev.com/65d5daa3dfa766ea89b2634d986488044659576f Cr-Commit-Position: refs/heads/master@{#351548}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Updated due to comments from tkent #

Patch Set 3 : Call StringStatics::init() from WTF::Initialize #

Patch Set 4 : Fixed the deduced string length (exclude NULL terminator) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -26 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/MakeNames.h.tmpl View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/Init.cpp View 1 2 3 chunks +26 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/QualifiedName.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/QualifiedName.cpp View 2 chunks +3 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/modules/InitModules.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/HashMap.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/MainThread.cpp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringStatics.cpp View 1 2 3 1 chunk +11 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (5 generated)
tkent
https://codereview.chromium.org/1363653006/diff/1/third_party/WebKit/Source/core/Init.cpp File third_party/WebKit/Source/core/Init.cpp (right): https://codereview.chromium.org/1363653006/diff/1/third_party/WebKit/Source/core/Init.cpp#newcode84 third_party/WebKit/Source/core/Init.cpp:84: // TODO: We should generate static strings initialization code. ...
5 years, 2 months ago (2015-09-28 00:11:17 UTC) #2
Mikhail
https://codereview.chromium.org/1363653006/diff/1/third_party/WebKit/Source/core/Init.cpp File third_party/WebKit/Source/core/Init.cpp (right): https://codereview.chromium.org/1363653006/diff/1/third_party/WebKit/Source/core/Init.cpp#newcode84 third_party/WebKit/Source/core/Init.cpp:84: // TODO: We should generate static strings initialization code. ...
5 years, 2 months ago (2015-09-28 08:39:34 UTC) #3
tkent
Many tests still fail. http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/59636/steps/content_browsertests%20%28with%20patch%29/logs/BackgroundSyncBrowserTest.CallDoneBeforeSyncFails ASSERTION FAILED: !string->isStatic() || result->isStatic() ../../third_party/WebKit/Source/wtf/text/AtomicString.cpp(60) : WTF::StringImpl *WTF::AtomicStringTable::addStringImpl(WTF::StringImpl *) ...
5 years, 2 months ago (2015-09-28 23:39:39 UTC) #4
Mikhail
On 2015/09/28 23:39:39, tkent wrote: > Many tests still fail. > > http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/59636/steps/content_browsertests%20%28with%20patch%29/logs/BackgroundSyncBrowserTest.CallDoneBeforeSyncFails > > ...
5 years, 2 months ago (2015-09-30 07:25:47 UTC) #7
tkent
lgtm
5 years, 2 months ago (2015-09-30 08:42:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1363653006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1363653006/100001
5 years, 2 months ago (2015-09-30 12:44:13 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:100001)
5 years, 2 months ago (2015-09-30 14:09:20 UTC) #12
commit-bot: I haz the power
5 years, 2 months ago (2015-09-30 14:10:05 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/65d5daa3dfa766ea89b2634d986488044659576f
Cr-Commit-Position: refs/heads/master@{#351548}

Powered by Google App Engine
This is Rietveld 408576698