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

Issue 559133002: Shrink the binary by not super inlining all string concatenations. (Closed)

Created:
6 years, 3 months ago by Daniel Bratell
Modified:
4 years, 2 months ago
CC:
blink-reviews, aandrey+blink_chromium.org, blink-reviews-wtf_chromium.org, Mikhail, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Shrink the binary by not super inlining all string concatenations. String concatenation is used a lot to build error and exception messages and it was larger than intended because of over eager inlining. Outlining template code saves 90 KB with clang and 65 KB with gcc (lin64 content_shell). After this there is roughly 60 KB of concatenation code left (clang). clang: Total change: -91866 bytes ========================== 47 added, totalling +6264 bytes across 3 sources 38 removed, totalling -18354 bytes across 2 sources 79 grown, for a net change of +4604 bytes (98534 bytes before, 103138 bytes after) across 50 sources 405 shrunk, for a net change of -84380 bytes (370130 bytes before, 285750 bytes after) across 134 sources gcc: Total change: -66849 bytes ========================== 333 added, totalling +81561 bytes across 69 sources 203 removed, totalling -65785 bytes across 76 sources 211 grown, for a net change of +18666 bytes (228381 bytes before, 247047 bytes after) across 85 sources 406 shrunk, for a net change of -101291 bytes (568083 bytes before, 466792 bytes after) across 160 sources BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181896

Patch Set 1 : String concatenations: Now with WTF_EXPORT. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -163 lines) Patch
M Source/wtf/text/StringConcatenate.h View 11 chunks +26 lines, -123 lines 1 comment Download
A Source/wtf/text/StringConcatenate.cpp View 1 chunk +150 lines, -0 lines 0 comments Download
M Source/wtf/text/StringOperators.h View 2 chunks +63 lines, -40 lines 0 comments Download
M Source/wtf/wtf.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
Daniel Bratell
jochen, can you please take a look, or redirect me to someone else if you ...
6 years, 3 months ago (2014-09-10 16:50:13 UTC) #3
jochen (gone - plz use gerrit)
lgtm.
6 years, 3 months ago (2014-09-12 07:55:23 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/559133002/20001
6 years, 3 months ago (2014-09-12 12:43:46 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:20001) as 181896
6 years, 3 months ago (2014-09-12 12:48:17 UTC) #7
Nico
4 years, 2 months ago (2016-10-01 16:47:30 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/559133002/diff/20001/Source/wtf/text/StringCo...
File Source/wtf/text/StringConcatenate.h (left):

https://codereview.chromium.org/559133002/diff/20001/Source/wtf/text/StringCo...
Source/wtf/text/StringConcatenate.h:347:
WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING();
FWIW, this made parts of StringOperatorsTest.cpp fairly pointless since that
test redefines the macro before including the header. Not sure what to do about
this; maybe the two functions using the macro should move back to the header?

Powered by Google App Engine
This is Rietveld 408576698