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

Side by Side Diff: build/android/gyp/dex.py

Issue 1129793002: Revert of Use --num-thread=10 when dexing Android code (saves 5 seconds) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 10
11 from util import build_utils 11 from util import build_utils
12 from util import md5_check 12 from util import md5_check
13 13
14 14
15 def DoDex(options, paths): 15 def DoDex(options, paths):
16 dx_binary = os.path.join(options.android_sdk_tools, 'dx') 16 dx_binary = os.path.join(options.android_sdk_tools, 'dx')
17 # See http://crbug.com/272064 for context on --force-jumbo. 17 # See http://crbug.com/272064 for context on --force-jumbo.
18 # --num-threads=10 made final dexing go from 10s -> 5s on a z620. 18 dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', options.dex_path]
19 dex_cmd = [dx_binary, '--num-threads=10', '--dex', '--force-jumbo',
20 '--output', options.dex_path]
21 if options.no_locals != '0': 19 if options.no_locals != '0':
22 dex_cmd.append('--no-locals') 20 dex_cmd.append('--no-locals')
23 21
24 dex_cmd += paths 22 dex_cmd += paths
25 23
26 record_path = '%s.md5.stamp' % options.dex_path 24 record_path = '%s.md5.stamp' % options.dex_path
27 md5_check.CallAndRecordIfStale( 25 md5_check.CallAndRecordIfStale(
28 lambda: build_utils.CheckOutput(dex_cmd, print_stderr=False), 26 lambda: build_utils.CheckOutput(dex_cmd, print_stderr=False),
29 record_path=record_path, 27 record_path=record_path,
30 input_paths=paths, 28 input_paths=paths,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 73
76 if options.depfile: 74 if options.depfile:
77 build_utils.WriteDepfile( 75 build_utils.WriteDepfile(
78 options.depfile, 76 options.depfile,
79 paths + build_utils.GetPythonDependencies()) 77 paths + build_utils.GetPythonDependencies())
80 78
81 79
82 80
83 if __name__ == '__main__': 81 if __name__ == '__main__':
84 sys.exit(main()) 82 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698