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

Unified Diff: gclient_utils.py

Issue 210063005: Disabled threaded index-pack for known difficult repositories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Don't set pack.threads for non-blacklisted repos. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 44dba57df2f8230c247e3bbf96eee5c58e61448c..3517946435a6efe346af97bb539f15f46f624166 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
+# 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,13 @@ 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()
+ result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit]
+ if url in THREADED_INDEX_PACK_BLACKLIST:
+ result.extend(['-c', 'pack.threads=1'])
+ return result
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698