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

Issue 2520863002: Enable precompiled headers for Blink on Windows. (Closed)

Created:
4 years ago by sof
Modified:
4 years ago
CC:
aboxhall, aboxhall+watch_chromium.org, Mads Ager (chromium), blink-reviews, blink-reviews-wtf_chromium.org, chromium-reviews, dmazzoni+watch_chromium.org, dmazzoni, dominicc+watchlist_chromium.org, dtseng+watch_chromium.org, haraken, je_julie, kinuko+watch, kouhei+heap_chromium.org, Mikhail, nektar+watch_chromium.org, nektarios, oilpan-reviews, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable precompiled headers for Blink on Windows. One reason Blink is slow to compile is that there is a lot of code included in every compilation unit. This is partly because everything depends on either LayoutObject.h or Document.h and those in turn include huge portions of the rest of Blink. By precompiling LayoutObject.h and Document.h, the compilation of core/ and modules/ in Blink can be considerably reduced; some numbers: @ r433149 config build (mins) size (Kb) ------------------------------------------------ master: Debug 149:30 9410487 master: Release 176:16 6118938 opera-pch[2]: Debug 134:59 9337121 opera-pch[2]: Release 160:42 6110812 opera-pch[3]: Debug 93:06 8935714 opera-pch[3]: Release 108:34 5029242 This for a clean build of target 'blink_tests', i.e., building both chromium and blink parts. The gains are all local to Blink, clearly. Host is an i7-3770 (4 phys cores); 32G + 256 SSD - Win7 Pro. The precompiled header file is judiciously (and forcefully) included while compiling the core/ + web/ (and some of modules/) sources. Except for some name disambiguation trivia when compiling the XPath grammar, no source changes are needed to make this work out. Note that distributed compilation system disables precompiled headers globally so this will *not* make trybots faster. But many developers don't have access to such super powers. This already landed[1] in the gyp/VS2013 world some time ago but unclear & unexplained bot failures caused a revert. Now with gn and VS2015 the world should be a better place. This CL actually takes over where [2] got stuck / ran out of time, extending its scope quite considerably (i.e., 40 mins faster builds wrt the above pch numbers.) [1] https://codereview.chromium.org/1167523007/ [2] https://codereview.chromium.org/2152783002/ [3] this CL. Note sheriffs: should unexplained Windows build errors surface on the bots, similar to the ones seen in crbug.com/511945, then please consider this CL a suspect. This was with GYP and earlier MSVC toolchains; we have no reason to believe the problem persists with GN and MSVC2015, we're just hoping for the best. R= BUG=495697 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/60880bc3884f2a65d27b8204b86ca5e863c35d1d Cr-Commit-Position: refs/heads/master@{#433832}

Patch Set 1 #

Total comments: 11

Patch Set 2 : followup review feedback #

Total comments: 2

Patch Set 3 : tidy enable_precompiled_headers init #

Total comments: 2

Patch Set 4 : update comment #

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -88 lines) Patch
M build/config/BUILD.gn View 1 4 chunks +5 lines, -6 lines 0 comments Download
A build/config/pch.gni View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/BUILD.gn View 1 1 chunk +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/build/win/Precompile.h View 1 2 3 1 chunk +11 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/build/win/Precompile.cpp View 1 1 chunk +6 lines, -34 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 3 chunks +38 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gni View 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/win/Precompile-core.h View 1 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/win/Precompile-core.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathGrammar.y View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gni View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/BUILD.gn View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 5 chunks +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/win/Precompile-platform.h View 1 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/win/Precompile-platform.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/BUILD.gn View 1 2 3 4 3 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/BUILD.gn View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M tools/mb/mb_config.pyl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 41 (29 generated)
sof
please take a look.
4 years ago (2016-11-21 10:05:36 UTC) #8
Nico
Thanks for picking this up, seems like a good week to try this again. The ...
4 years ago (2016-11-21 15:42:25 UTC) #11
sof
Thanks for the quick review, thakis. > The CL description should call out that there's ...
4 years ago (2016-11-21 19:24:58 UTC) #15
Nico
lgtm https://codereview.chromium.org/2520863002/diff/20001/build/config/pch.gni File build/config/pch.gni (right): https://codereview.chromium.org/2520863002/diff/20001/build/config/pch.gni#newcode14 build/config/pch.gni:14: enable_precompiled_headers = true enable_precompiled_headers = !is_official_build && !use_goma ...
4 years ago (2016-11-21 23:03:41 UTC) #17
sof
tkent@, jochen@: could you have a look as platform owners, please? https://codereview.chromium.org/2520863002/diff/20001/build/config/pch.gni File build/config/pch.gni (right): ...
4 years ago (2016-11-22 06:34:43 UTC) #23
tkent
lgtm https://codereview.chromium.org/2520863002/diff/40001/third_party/WebKit/Source/build/win/Precompile.h File third_party/WebKit/Source/build/win/Precompile.h (right): https://codereview.chromium.org/2520863002/diff/40001/third_party/WebKit/Source/build/win/Precompile.h#newcode10 third_party/WebKit/Source/build/win/Precompile.h:10: // Precompiled header for WebKit when built on ...
4 years ago (2016-11-22 06:53:53 UTC) #24
sof
https://codereview.chromium.org/2520863002/diff/40001/third_party/WebKit/Source/build/win/Precompile.h File third_party/WebKit/Source/build/win/Precompile.h (right): https://codereview.chromium.org/2520863002/diff/40001/third_party/WebKit/Source/build/win/Precompile.h#newcode10 third_party/WebKit/Source/build/win/Precompile.h:10: // Precompiled header for WebKit when built on Windows ...
4 years ago (2016-11-22 07:05:44 UTC) #25
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/2520863002/60001
4 years ago (2016-11-22 07:06:02 UTC) #28
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/2520863002/80001
4 years ago (2016-11-22 07:13:59 UTC) #32
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/2520863002/80001
4 years ago (2016-11-22 09:08:12 UTC) #35
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-11-22 10:39:51 UTC) #38
commit-bot: I haz the power
4 years ago (2016-11-22 10:43:31 UTC) #40
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/60880bc3884f2a65d27b8204b86ca5e863c35d1d
Cr-Commit-Position: refs/heads/master@{#433832}

Powered by Google App Engine
This is Rietveld 408576698