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

Issue 773883002: Cache data for included files in the multiprocess load codepath (Closed)

Created:
6 years ago by Shezan Baig (Bloomberg)
Modified:
6 years ago
Reviewers:
scottmg
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Cache data for included files in the multiprocess load codepath When running gyp with --no-parallel, the build file data for included gypi files is cached in the 'data' dict, so we never load gypi files more than once. However, when running in parallel mode, the |data| and |aux_data| parameters passed to CallLoadTargetBuildFile are always empty. That means gypi files are reloaded for every single gyp file. This commit changes CallLoadTargetBuildFile to use a global |per_process_data| and |per_process_aux_data|, instead of accepting them as parameters. This allows each subprocess to get gypi file data from this per-process cache if it has already encountered the gypi file when loading a previous target build file. Another minor change in this commit is to remove aux_data from ParallelState. The aux_data is only ever used within the scope of LoadTargetBuildFile, so we don't need to communicate it back to the main process. BUG= R=scottmg@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=2012

Patch Set 1 #

Total comments: 3

Patch Set 2 : Review changes #

Patch Set 3 : Remove unused 'aux_data' parameter in LoadTargetBuildFilesParallel #

Patch Set 4 : Remove global statements #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -44 lines) Patch
M pylib/gyp/input.py View 1 2 3 11 chunks +31 lines, -44 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Shezan Baig (Bloomberg)
Scott, I noticed that you have done some work with the parallel load stuff, so ...
6 years ago (2014-12-02 19:28:38 UTC) #2
scottmg
lgtm https://codereview.chromium.org/773883002/diff/1/pylib/gyp/input.py File pylib/gyp/input.py (right): https://codereview.chromium.org/773883002/diff/1/pylib/gyp/input.py#newcode466 pylib/gyp/input.py:466: per_process_data = {} please move these up to ...
6 years ago (2014-12-02 22:50:53 UTC) #3
Shezan Baig (Bloomberg)
PTAL - I removed the unused 'aux_data' parameter in LoadTargetBuildFilesParallel Also, pylint complains about: W:480, ...
6 years ago (2014-12-03 14:24:16 UTC) #4
scottmg
On 2014/12/03 14:24:16, Shezan Baig (Bloomberg) wrote: > PTAL - I removed the unused 'aux_data' ...
6 years ago (2014-12-03 17:41:34 UTC) #5
Shezan Baig (Bloomberg)
On 2014/12/03 17:41:34, scottmg wrote: > On 2014/12/03 14:24:16, Shezan Baig (Bloomberg) wrote: > > ...
6 years ago (2014-12-03 17:51:09 UTC) #6
Shezan Baig (Bloomberg)
6 years ago (2014-12-03 18:46:11 UTC) #7
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as 2012 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698