Commit 1206a353 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

[autoninja] change default -j multiplier 20 -> 40

I compared build time of chrome on some platforms without goma backend cache case.

* 4C/8T MacBook Pro
x20: 1900s
x40: 1357s

* 24C/48T Z840 Windows 10:
x20: 747s
x40: 733s

* 24C/48T Z840 Linux:
x20: 267s
x40: 189s

Change-Id: Iaa4c1e770ffcbc3f7d355060d0df03bf3f3b344f
Reviewed-on: https://chromium-review.googlesource.com/c/1457037
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: 's avatarShinya Kawanaka <shinyak@chromium.org>
Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent b9ae2ca9
......@@ -79,8 +79,14 @@ num_cores = multiprocessing.cpu_count()
if not j_specified and not t_specified:
if use_goma:
args.append('-j')
core_multiplier = int(os.environ.get("NINJA_CORE_MULTIPLIER", "20"))
args.append('%d' % (num_cores * core_multiplier))
core_multiplier = int(os.environ.get("NINJA_CORE_MULTIPLIER", "40"))
j_value = num_cores * core_multiplier
if sys.platform.startswith('win'):
# On windows, j value higher than 1000 does not improve build performance.
j_value = min(j_value, 1000)
args.append('%d' % j_value)
else:
core_addition = os.environ.get("NINJA_CORE_ADDITION")
if core_addition:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment