DescriptionEnable 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 #Messages
Total messages: 41 (29 generated)
|