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

Issue 2142513003: Use initializer_lists for static WTF::HashSets. (Closed)

Created:
4 years, 5 months ago by esprehn
Modified:
4 years, 5 months ago
Reviewers:
haraken, jbroman
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, chromium-reviews, dglazkov+blink, dominicc+watchlist_chromium.org, krit, eae+blinkwatch, f(malita), fs, gavinp+loader_chromium.org, gyuyoung2, Nate Chapin, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, loading-reviews+fetch_chromium.org, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, sof, szager+layoutwatch_chromium.org, tyoshino+watch_chromium.org, webcomponents-bugzilla_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use initializer_lists for static WTF::HashSets. HashSet::add() inlines a lot of code at the call site for performance, but this causes binary bloat when setting up large static hash sets. Lets use initializer lists instead, this results in prettier code and a smaller binary, plus it lets the hash set reserve the right capacity immediately avoiding bloat and rehashing. In a shared library Release build I see: - libmodules.dylib gets 15.7k smaller. - libwebcore_shared.dylib gets 30.9k smaller. - libblink_platform.dylib gets 1k smaller. This also makes the object files smaller, for example modules.DatabaseAuthorizer.o is reduced from 592kb to 466kb for a reduction in size of 126kb. Committed: https://crrev.com/499ab26b15f221bbd217f068720bc9fe9b2e6923 Cr-Commit-Position: refs/heads/master@{#405043}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+452 lines, -496 lines) Patch
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 chunk +14 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElement.cpp View 1 chunk +10 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp View 1 chunk +24 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/RemoveFormatCommand.cpp View 1 chunk +26 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp View 1 chunk +50 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp View 1 chunk +8 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchUtils.cpp View 1 chunk +23 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResource.cpp View 1 chunk +12 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/html/RelList.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/RelList.cpp View 1 chunk +21 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/SVGResources.cpp View 1 chunk +45 lines, -57 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.cpp View 1 chunk +93 lines, -99 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGLength.cpp View 1 chunk +12 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGUseElement.cpp View 1 chunk +22 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathParser.cpp View 1 chunk +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.h View 2 chunks +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp View 4 chunks +69 lines, -64 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp View 1 chunk +17 lines, -27 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
esprehn
4 years, 5 months ago (2016-07-12 19:10:24 UTC) #6
jbroman
lgtm \o/
4 years, 5 months ago (2016-07-12 19:22:25 UTC) #10
haraken
LGTM. Great.
4 years, 5 months ago (2016-07-13 00:09:07 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2142513003/1
4 years, 5 months ago (2016-07-13 00:42:30 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/261662)
4 years, 5 months ago (2016-07-13 02:57:26 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2142513003/1
4 years, 5 months ago (2016-07-13 03:58:16 UTC) #18
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-13 05:22:24 UTC) #19
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 05:25:04 UTC) #21
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/499ab26b15f221bbd217f068720bc9fe9b2e6923
Cr-Commit-Position: refs/heads/master@{#405043}

Powered by Google App Engine
This is Rietveld 408576698