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

Issue 812263002: Add /Gw to the compiler command line to reduce .dll sizes by 0.85% (Closed)

Created:
6 years ago by brucedawson
Modified:
5 years, 11 months ago
Reviewers:
Nico, scottmg
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add /Gw to the compiler command line to reduce .dll sizes by 0.85% /Gw is a new command added in VS 2013 Update 2 that puts individual global variables in their own COMDATs so that /opt:ref can more efficiently throw them out. Size savings with buildtype=Official are shown below: DLL Name Old size New size Bytes Saved Percentage chrome.dll 30,918,656 30,766,592 152,064 0.49% chrome_child.dll 35,204,096 34,797,056 407,040 1.16% chrome_elf.dll 125,952 124,928 1,024 0.81% chrome_watcher.dll 216,576 213,504 3,072 1.42% pdf.dll 9,200,128 9,162,240 37,888 0.41% Total 75,665,408 75,064,320 601,088 0.79% Some of the saving is from getting rid of unused duplicate copies of const globals declared in header files. twoPiDouble and piDouble, for instance, were showing up 2,051 and 1,408 times respectively. This fix covers most or all of the problems covered by bug 441988 as well as other wastage. BUG=441988 Committed: https://crrev.com/145c9c07b8fe42e0eb6cf997c67070fc62dd241e Cr-Commit-Position: refs/heads/master@{#309067}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Comment fixes and revert release_defaults.gypi #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M build/common.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
brucedawson
Scott, this looks like an easy change to shave off 0.85% (550 KiB) of size ...
6 years ago (2014-12-18 02:02:04 UTC) #2
scottmg
Cool! I haven't used this flag before. My only concern would be if there's any ...
6 years ago (2014-12-18 03:05:38 UTC) #3
brucedawson
As a bonus, this flag mostly resolves the issues mentioned in bug https://code.google.com/p/chromium/issues/detail?id=441988. Without /gW ...
6 years ago (2014-12-18 17:58:07 UTC) #4
brucedawson
I fixed the comment, simplified the change, and added measurements for pdf.dll. Let me know ...
6 years ago (2014-12-18 18:13:13 UTC) #5
scottmg
On 2014/12/18 18:13:13, brucedawson wrote: > I fixed the comment, simplified the change, and added ...
6 years ago (2014-12-18 18:21:05 UTC) #6
scottmg
Also, was there a BUG= to tag this with?
6 years ago (2014-12-18 18:21:19 UTC) #7
brucedawson
Duplicate static/const variable bug added.
6 years ago (2014-12-18 18:58:43 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/812263002/20001
6 years ago (2014-12-18 19:00:45 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
6 years ago (2014-12-18 20:36:14 UTC) #11
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/145c9c07b8fe42e0eb6cf997c67070fc62dd241e Cr-Commit-Position: refs/heads/master@{#309067}
6 years ago (2014-12-18 20:36:58 UTC) #12
Nico
(Belated nit: I always think it's somewhat dishonest to express size changes in terms of ...
5 years, 11 months ago (2014-12-29 19:47:16 UTC) #14
brucedawson
5 years, 11 months ago (2014-12-29 19:49:45 UTC) #15
Message was sent while issue was closed.
Interesting perspective Nico. I'm a huge fan of using percentages to describe
improvements since it avoids overselling, but I hadn't considered that the other
side of that coin is using them to downplay regressions.

Powered by Google App Engine
This is Rietveld 408576698