New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 691844 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

git cl patch takes ~10s for a 1-line patch

Project Member Reported by erikc...@chromium.org, Feb 14 2017

Issue description

"""
erikchen@erikchen-macpro ~/projects/chromium3/src  (temp69)$ git cl patch -vvv 2673173002
[D2017-02-13 17:36:17,568 21191 140735140511744 subprocess2.py] git -c color.ui=never update-index --refresh -q
[D2017-02-13 17:36:18,754 21191 140735140511744 subprocess2.py] git -c color.ui=never diff-index --name-status HEAD
[D2017-02-13 17:36:20,531 21191 140735140511744 subprocess2.py] git symbolic-ref HEAD
[D2017-02-13 17:36:20,539 21191 140735140511744 subprocess2.py] git symbolic-ref HEAD
[D2017-02-13 17:36:20,546 21191 140735140511744 subprocess2.py] git config branch.temp69.rietveldissue
[D2017-02-13 17:36:20,552 21191 140735140511744 subprocess2.py] git config branch.temp69.gerritissue
[D2017-02-13 17:36:20,558 21191 140735140511744 subprocess2.py] git config rietveld.autoupdate
[D2017-02-13 17:36:20,563 21191 140735140511744 git_cl.py] Failed running ['git', 'config', 'rietveld.autoupdate']
[D2017-02-13 17:36:20,564 21191 140735140511744 subprocess2.py] git rev-parse --show-cdup
[D2017-02-13 17:36:20,576 21191 140735140511744 subprocess2.py] git config rietveld.server https://codereview.chromium.org
[D2017-02-13 17:36:20,587 21191 140735140511744 subprocess2.py] git config rietveld.cc chromium-reviews@chromium.org
[D2017-02-13 17:36:20,596 21191 140735140511744 subprocess2.py] git config --unset-all rietveld.private
[D2017-02-13 17:36:20,604 21191 140735140511744 git_cl.py] Failed running ['git', 'config', '--unset-all', 'rietveld.private']
[D2017-02-13 17:36:20,604 21191 140735140511744 subprocess2.py] git config rietveld.tree-status-url http://chromium-status.appspot.com/status
[D2017-02-13 17:36:20,612 21191 140735140511744 subprocess2.py] git config rietveld.viewvc-url https://chromium.googlesource.com/chromium/src/+/
[D2017-02-13 17:36:20,626 21191 140735140511744 subprocess2.py] git config --unset-all rietveld.bug-prefix
[D2017-02-13 17:36:20,635 21191 140735140511744 git_cl.py] Failed running ['git', 'config', '--unset-all', 'rietveld.bug-prefix']
[D2017-02-13 17:36:20,635 21191 140735140511744 subprocess2.py] git config --unset-all rietveld.cpplint-regex
[D2017-02-13 17:36:20,644 21191 140735140511744 git_cl.py] Failed running ['git', 'config', '--unset-all', 'rietveld.cpplint-regex']
[D2017-02-13 17:36:20,644 21191 140735140511744 subprocess2.py] git config rietveld.cpplint-ignore-regex webkit/api/.*
[D2017-02-13 17:36:20,653 21191 140735140511744 subprocess2.py] git config rietveld.project chromium
[D2017-02-13 17:36:20,662 21191 140735140511744 subprocess2.py] git config rietveld.run-post-upload-hook True
[D2017-02-13 17:36:20,670 21191 140735140511744 subprocess2.py] git config gerrit.host
[D2017-02-13 17:36:20,681 21191 140735140511744 git_cl.py] Failed running ['git', 'config', 'gerrit.host']
[D2017-02-13 17:36:20,682 21191 140735140511744 subprocess2.py] git config rietveld.server
[D2017-02-13 17:36:20,688 21191 140735140511744 subprocess2.py] git -c color.ui=never update-index --refresh -q
[D2017-02-13 17:36:21,876 21191 140735140511744 subprocess2.py] git -c color.ui=never diff-index --name-status HEAD
[D2017-02-13 17:36:23,664 21191 140735140511744 subprocess2.py] git config branch.temp69.rietveldserver
[D2017-02-13 17:36:23,671 21191 140735140511744 auth.py] Using auth config AuthConfig(use_oauth2=True, save_cookies=False, use_local_webserver=True, webserver_port=8090, refresh_token_json='')
[D2017-02-13 17:36:23,675 21191 140735140511744 rietveld.py] POSTing to /api/2673173002?messages=true, args {'payload': None, 'timeout': 15}.
[D2017-02-13 17:36:23,676 21191 140735140511744 rietveld.py] /api/2673173002?messages=true
[D2017-02-13 17:36:23,676 21191 140735140511744 auth.py] Reloading access token from cache
[D2017-02-13 17:36:23,676 21191 140735140511744 auth.py] Using token storage '/Users/erikchen/.depot_tools_oauth2_tokens' (cache key 'codereview.chromium.org')
[D2017-02-13 17:36:23,680 21191 140735140511744 auth.py] cached token info: {'token_expiry': datetime.datetime(2017, 2, 14, 2, 30, 51), 'has_access_token': True, 'utcnow': datetime.datetime(2017, 2, 14, 1, 36, 23, 680577), 'invalid': False, 'access_token_expired': False}
[D2017-02-13 17:36:24,480 21191 140735140511744 rietveld.py] POSTing to /api/2673173002/40001, args {'payload': None, 'timeout': 15}.
[D2017-02-13 17:36:24,480 21191 140735140511744 rietveld.py] /api/2673173002/40001
[D2017-02-13 17:36:25,354 21191 140735140511744 rietveld.py] build/config/allocator.gni
[D2017-02-13 17:36:25,355 21191 140735140511744 rietveld.py] POSTing to /download/issue2673173002_40001_50001.diff, args {'payload': None, 'timeout': 15}.
[D2017-02-13 17:36:25,355 21191 140735140511744 rietveld.py] /download/issue2673173002_40001_50001.diff
[D2017-02-13 17:36:25,537 21191 140735140511744 subprocess2.py] git apply --index -3 -p1;  cwd=/Volumes/MacintoshHD3/projects/chromium3/src
[D2017-02-13 17:36:26,887 21191 140735140511744 subprocess2.py] git diff --ignore-submodules --name-only --staged;  cwd=/Volumes/MacintoshHD3/projects/chromium3/src
[D2017-02-13 17:36:27,496 21191 140735140511744 rietveld.py] POSTing to /2673173002/description, args {'payload': None, 'timeout': 15}.
[D2017-02-13 17:36:27,497 21191 140735140511744 rietveld.py] /2673173002/description
[D2017-02-13 17:36:27,618 21191 140735140511744 subprocess2.py] git commit -m mac: Turn on allocator shim.

Prior to this CL, all Malloc Zone functions were rerouted through a light-weight
shim that kills the process [in oom_killer_malloc] on failure. This CL instead
reroutes the functions to the allocator shim, which is cross-platform, and has
the same effect on failure. The allocator shim also provides the ability to
track all allocations.

BUG= 677302 

patch from issue 2673173002 at patchset 40001 (http://crrev.com/2673173002#ps40001)
[D2017-02-13 17:36:29,938 21191 140735140511744 subprocess2.py] git config branch.temp69.rietveldissue 2673173002
[D2017-02-13 17:36:29,948 21191 140735140511744 subprocess2.py] git config branch.temp69.rietveldserver https://codereview.chromium.org
[D2017-02-13 17:36:29,957 21191 140735140511744 subprocess2.py] git config branch.temp69.rietveldpatchset 40001
Committed patch locally.
"""

Based on this output, I guess we could just say that git is slow on mac, but it also looks like there are a lot of failures. Maybe this can be trimmed down a little?
 
Cc: aga...@chromium.org iannucci@chromium.org tandrii@chromium.org
Status: Available (was: Untriaged)
I get ~10s for this as well on my mac pro. On my z840 on linux, it takes ~5s. So at least part of this is mac slowness.

But, I agree that looks like there are a lot of subprocess calls including failures, so, yeah, hopefully there's things we can do to improve things, too.

Calling update-index and diff-index twice, for example, seems expensive. And, I'd hope some or all of those `git config` calls could be collapsed somehow or even skipped.
Components: -Infra Infra>SDK Infra>Codereview>Rietveld
Status: WontFix (was: Available)
Closing in bulk due to Rietveld’s deprecation in favor of Gerrit. If you feel this bug should not have been closed, please feel free to re-open.

Sign in to add a comment