Chromium Code Reviews| Index: gclient_utils.py |
| diff --git a/gclient_utils.py b/gclient_utils.py |
| index 44dba57df2f8230c247e3bbf96eee5c58e61448c..3fcc903cdf4dedc1cbe2e66b459ff4c5fae0f244 100644 |
| --- a/gclient_utils.py |
| +++ b/gclient_utils.py |
| @@ -30,6 +30,14 @@ RETRY_INITIAL_SLEEP = 0.5 |
| _WARNINGS = [] |
| +# These repos are known to cause OOM errors on 32-bit platforms, due the the |
|
mmoss
2014/03/25 00:21:44
It would be nice if this only kicked in under thos
|
| +# very large objects they contain. It is not safe to use threaded index-pack |
| +# when cloning/fetching them. |
| +THREADED_INDEX_PACK_BLACKLIST = [ |
| + 'https://chromium.googlesource.com/chromium/reference_builds/chrome_win.git' |
| +] |
| + |
| + |
| class Error(Exception): |
| """gclient exception class.""" |
| def __init__(self, msg, *args, **kwargs): |
| @@ -990,10 +998,12 @@ def DefaultDeltaBaseCacheLimit(): |
| else: |
| return '512m' |
| -def DefaultIndexPackConfig(): |
| +def DefaultIndexPackConfig(url=''): |
| """Return reasonable default values for configuring git-index-pack. |
| Experiments suggest that higher values for pack.threads don't improve |
| performance.""" |
| - return ['-c', 'pack.threads=5', '-c', |
| - 'core.deltaBaseCacheLimit=%s' % DefaultDeltaBaseCacheLimit()] |
| + cache_limit = DefaultDeltaBaseCacheLimit() |
| + pack_threads = 1 if url in THREADED_INDEX_PACK_BLACKLIST else 4 |
|
iannucci
2014/03/24 23:45:10
Not sure about the hard-coded 4 default. What abou
szager1
2014/03/24 23:56:44
I don't have any reason to believe that 4 is more
mmoss
2014/03/25 00:21:44
Yeah, only adding the command-line arg when "neces
szager1
2014/03/25 00:40:25
OK, the code now only sets pack.threads on the com
|
| + return ['-c', 'pack.threads=%d' % pack_threads, |
| + '-c', 'core.deltaBaseCacheLimit=%s' % cache_limit] |