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

Issue 203193003: ninja: Collapse rule inputs into a single node when it makes sense. (Closed)

Created:
6 years, 9 months ago by Nico
Modified:
6 years, 9 months ago
Reviewers:
scottmg
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

ninja: Collapse rule inputs into a single node when it makes sense. Before this CL, if a rule matched N source files and had M inputs, the inputs where repeated for every build edge, hence showing up N * M times in the generated ninja file. After this, gyp instead writes a single stamp node depending on all the inputs and makes every source rule edge depend on this stamp file, reducing the number of times they show up in the generated ninja file to N + M. (Also bake order-only deps into this new node.) No behavior change. Reduces the size of individual_generated_bindings.ninja from 4.5MB to 401kB, and the size of all generated ninja files in chromium from 15.1MB to 10.9MB. This in turn speeds up empty builds by 60ms on my SSD laptop and by probably over 0.1s on my HDD desktop (didn't try that due to lack of travel desktop though). BUG=chromium:350317 R=scottmg@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1879

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -4 lines) Patch
M pylib/gyp/generator/ninja.py View 3 chunks +17 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
scottmg
Slightly concerned that the extra stamp file might be slower for Windows, but otherwise seems ...
6 years, 9 months ago (2014-03-18 16:27:57 UTC) #1
Nico
6 years, 9 months ago (2014-03-20 09:57:06 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r1879 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698