New issue
Advanced search Search tips

Issue 880734 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

git cl reverse issue lookup is slow in a tree with hundreds of branches

Project Member Reported by brat...@opera.com, Sep 5

Issue description

git cl issue -r <issue_number> will tell you what branch you are using for that CL, but if you have a tree with hundreds of branches it will not be fast.

In my tree with 700 local branches, it takes 13 seconds to look up a branch. This is because git_cl.py runs "git config" twice for every branch, basically parsing .git/config 1400 times.


 
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/b56a43a9064c35e81be989f5e86a19d9159d5edf

commit b56a43a9064c35e81be989f5e86a19d9159d5edf
Author: Daniel Bratell <bratell@opera.com>
Date: Thu Sep 06 15:49:03 2018

Read the git config only once when doing a git cl issue -r lookup

Running git cl issue -r in a tree with dozens/hundreds of branches
could be a bit slow since the code parsed .git/config twice per
local branch. By parsing it only once and then looking things up
in a hashtable it becomes much faster. (For my local tree with 700
branches 13 seconds became 0.3 seconds)

Bug:  880734 
Change-Id: I67f45de32fb7f2cc5960174e59f3476ef3021a3a
Reviewed-on: https://chromium-review.googlesource.com/1206352
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/b56a43a9064c35e81be989f5e86a19d9159d5edf/git_cl.py

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c72bfab862a30c6ee32d0cad4e08f4bee90a170d

commit c72bfab862a30c6ee32d0cad4e08f4bee90a170d
Author: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Thu Sep 06 20:58:45 2018

Roll src/third_party/depot_tools 0f5a0b440989..b56a43a9064c (2 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/0f5a0b440989..b56a43a9064c


git log 0f5a0b440989..b56a43a9064c --date=short --no-merges --format='%ad %ae %s'
2018-09-06 bratell@opera.com Read the git config only once when doing a git cl issue -r lookup
2018-09-06 cwallez@chromium.org Add Dawn got_revision_mapping to glient config


Created with:
  gclient setdep -r src/third_party/depot_tools@b56a43a9064c

The AutoRoll server is located here: https://autoroll.skia.org/r/depot-tools-chromium-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:880734 , chromium:875245 
TBR=agable@chromium.org

Change-Id: I018ecfb1f6b0268afd18797281d67e5659877684
Reviewed-on: https://chromium-review.googlesource.com/1210446
Reviewed-by: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#589294}
[modify] https://crrev.com/c72bfab862a30c6ee32d0cad4e08f4bee90a170d/DEPS

Status: Fixed (was: Started)

Sign in to add a comment