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

Issue 235083003: gyp performance: Add a DoMain version of build/compiler_version (Closed)

Created:
6 years, 8 months ago by Daniel Bratell
Modified:
6 years, 8 months ago
Reviewers:
scottmg
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

gyp performance: Add a DoMain version of build/compiler_version No need to start a full python interpreter for compiler_version.py. This saves about 0.6 CPU seconds. BUG=362075 R=scottmg@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264303

Patch Set 1 #

Total comments: 9

Patch Set 2 : compiler_version: fixed style #

Patch Set 3 : compiler_version: The rest of the style. #

Patch Set 4 : compiler_version: Rebased to newer master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -24 lines) Patch
M build/common.gypi View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M build/compiler_version.py View 1 2 3 chunks +40 lines, -22 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Daniel Bratell
A patch I forgot about (because it wasn't in the gyp repo): compiler_version, like dir_exists, ...
6 years, 8 months ago (2014-04-15 15:41:18 UTC) #1
scottmg
lgtm https://codereview.chromium.org/235083003/diff/1/build/compiler_version.py File build/compiler_version.py (right): https://codereview.chromium.org/235083003/diff/1/build/compiler_version.py#newcode17 build/compiler_version.py:17: compiler_version_cache = {} # Map from (compiler, tool) ...
6 years, 8 months ago (2014-04-15 18:29:01 UTC) #2
Daniel Bratell
https://codereview.chromium.org/235083003/diff/1/build/compiler_version.py File build/compiler_version.py (right): https://codereview.chromium.org/235083003/diff/1/build/compiler_version.py#newcode22 build/compiler_version.py:22: cached_version = compiler_version_cache.get(cache_key) On 2014/04/15 18:29:02, scottmg wrote: > ...
6 years, 8 months ago (2014-04-15 19:37:41 UTC) #3
Daniel Bratell
The CQ bit was checked by bratell@opera.com
6 years, 8 months ago (2014-04-16 16:54:54 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/235083003/40001
6 years, 8 months ago (2014-04-16 16:56:09 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 16:56:14 UTC) #6
commit-bot: I haz the power
Failed to apply patch for build/common.gypi: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-16 16:56:14 UTC) #7
Daniel Bratell
The CQ bit was checked by bratell@opera.com
6 years, 8 months ago (2014-04-16 17:51:13 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/235083003/60001
6 years, 8 months ago (2014-04-16 17:51:37 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-16 17:57:00 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-16 17:57:01 UTC) #11
Daniel Bratell
The CQ bit was checked by bratell@opera.com
6 years, 8 months ago (2014-04-16 19:27:53 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/235083003/60001
6 years, 8 months ago (2014-04-16 19:28:07 UTC) #13
commit-bot: I haz the power
Change committed as 264303
6 years, 8 months ago (2014-04-16 20:59:20 UTC) #14
Daniel Bratell
6 years, 8 months ago (2014-04-17 09:46:09 UTC) #15
Message was sent while issue was closed.
On 2014/04/15 19:37:41, Daniel Bratell wrote:
> https://codereview.chromium.org/235083003/diff/1/build/compiler_version.py
> File build/compiler_version.py (right):
> 
>
https://codereview.chromium.org/235083003/diff/1/build/compiler_version.py#ne...
> build/compiler_version.py:22: cached_version =
> compiler_version_cache.get(cache_key)
> On 2014/04/15 18:29:02, scottmg wrote:
> > is it the cache (not-invoking-compiler) or the not-invoking-python that
helps
> > here?
> 
> A bit hard to say because the python profiler doesn't correctly time external
> processes. I did some simple measurements and I would say that about 400 ms is
> the external -> DoMain conversion and 200 ms is the internal cache. Left is 13
> ms + the part that the profiler doesn't catch, probably just a few ms.

I should mention that there is a third factor. Since the expansion string is now
constant (no more DEPTH variable), it gets a much increased hit rate in the
internal gyp expansion cache.

Powered by Google App Engine
This is Rietveld 408576698