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

Issue 2472813002: [gn] Consolidate exec_script calls to speed up generation (Closed)

Created:
4 years, 1 month ago by jamesr
Modified:
4 years, 1 month ago
Reviewers:
zra
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[gn] Consolidate exec_script calls to speed up generation Calling out to python from GN to process gypi files is relatively expensive with a 20-45ms fixed overhead for setup/teardown regardless of what the script does. This makes runtime/vm/BUILD.gn take 1-1.5s (per toolchain) to run as the template for libraries expands out to 25 calls to gypi_to_gn.py, even though the actual time spent processing the gypi files is negligible. This replaces those repeated calls to gypi_to_gn.py with a call to a custom script that process all of the gypi files needed for runtime/vm and places the results into a single scope which can then be read from in the template and replaces a few other scattered calls to gypi_to_gn.py with a smaller number of calls that process multiple gypi files and place the results into a single scope. The end result is processing all of dart's GN files in a fuchsia build takes ~250ms instead of >3 seconds. R=zra@google.com Committed: https://github.com/dart-lang/sdk/commit/ad86d6ed26e3b6eeeaa96b654881a49c4b04a561 Committed: https://github.com/dart-lang/sdk/commit/7a43c648c381be8c98b7a0710d239aa7d44100ae

Patch Set 1 #

Patch Set 2 : [gn] Consolidate exec_script calls to speed up generation #

Patch Set 3 : [gn] Consolidate exec_script calls to speed up generation #

Patch Set 4 : [gn] Consolidate exec_script calls to speed up generation #

Total comments: 4

Patch Set 5 : [gn] Consolidate exec_script calls to speed up generation #

Patch Set 6 : fix paths to sources in generate_patched_sdk #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+320 lines, -218 lines) Patch
M runtime/bin/BUILD.gn View 10 chunks +10 lines, -53 lines 0 comments Download
A runtime/bin/gypi_contents.gni View 1 chunk +43 lines, -0 lines 0 comments Download
M runtime/vm/BUILD.gn View 1 2 3 4 5 18 chunks +106 lines, -107 lines 2 comments Download
A runtime/vm/gypi_contents.gni View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download
M tools/gypi_to_gn.py View 6 chunks +40 lines, -58 lines 0 comments Download
A tools/process_gypis.py View 1 2 3 4 1 chunk +69 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
jamesr
4 years, 1 month ago (2016-11-10 21:15:27 UTC) #3
jamesr
I verified this produces the same build by diffing the output of 'gn desc' on ...
4 years, 1 month ago (2016-11-10 21:17:26 UTC) #4
zra
Cool, thanks! lgtm w/ comment and indentation fix. https://codereview.chromium.org/2472813002/diff/60001/runtime/vm/BUILD.gn File runtime/vm/BUILD.gn (right): https://codereview.chromium.org/2472813002/diff/60001/runtime/vm/BUILD.gn#newcode183 runtime/vm/BUILD.gn:183: # ...
4 years, 1 month ago (2016-11-10 21:30:41 UTC) #5
jamesr
Committed patchset #5 (id:80001) manually as ad86d6ed26e3b6eeeaa96b654881a49c4b04a561 (presubmit successful).
4 years, 1 month ago (2016-11-10 23:10:39 UTC) #7
jamesr
Seems to redden the bots, revert here: https://codereview.chromium.org/2492053002
4 years, 1 month ago (2016-11-10 23:17:09 UTC) #8
jamesr
PTAL, fixed applied here (as the diff is small relative to the patch set that ...
4 years, 1 month ago (2016-11-11 00:23:24 UTC) #9
zra
lgtm https://codereview.chromium.org/2472813002/diff/100001/runtime/vm/BUILD.gn File runtime/vm/BUILD.gn (right): https://codereview.chromium.org/2472813002/diff/100001/runtime/vm/BUILD.gn#newcode421 runtime/vm/BUILD.gn:421: libsources = rebase_path(library[1], ".", library[2]) On 2016/11/11 00:23:24, ...
4 years, 1 month ago (2016-11-11 03:23:51 UTC) #10
jamesr
4 years, 1 month ago (2016-11-12 18:56:51 UTC) #12
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
7a43c648c381be8c98b7a0710d239aa7d44100ae (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698