Commit 0f9ad3a2 authored by agrieve's avatar agrieve Committed by Commit bot

Use --num-thread=10 when dexing Android code (saves 5 seconds)

Timing for creating chrome_apk/classes.dex:

No flag:
real    0m10.767s
user    0m16.480s
sys     0m0.444s

--num-threads=4
real    0m7.450s
user    0m11.837s
sys     0m0.606s

--num-threads=10 (or 20, or 80)
real    0m5.399s
user    0m9.266s
sys     0m0.420s

Timings performed on a z620 workstation.

BUG=

Review URL: https://codereview.chromium.org/1109193002

Cr-Commit-Position: refs/heads/master@{#327358}
parent 8f9fd102
......@@ -15,7 +15,9 @@ from util import md5_check
def DoDex(options, paths):
dx_binary = os.path.join(options.android_sdk_tools, 'dx')
# See http://crbug.com/272064 for context on --force-jumbo.
dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', options.dex_path]
# --num-threads=10 made final dexing go from 10s -> 5s on a z620.
dex_cmd = [dx_binary, '--num-threads=10', '--dex', '--force-jumbo',
'--output', options.dex_path]
if options.no_locals != '0':
dex_cmd.append('--no-locals')
......
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