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
Messages
Total messages: 12 (4 generated)
|