This message was deleted.
# how-do-i
s
This message was deleted.
a
a “really long time” being like 3-4 seconds
j
We currently do a questionably necessary check here at the git level when we could just be checking the PR's merged status. The longer each branch is and the further behind trunk it is, the longer this check takes. I've considered removing it and I've also thought about caching it. With that said — for now, you can look at the
--debug
output to see which branch might be taking so much time as it'll have a lot of
merge-base
and
cherry
calls traversing its history, and likely untrack it as a workaround — I imagine that if it's not being rebased, you likely don't need it tracked.
a
cool, that sounds like the issue. I have a few very old branches that havent been rebased due to conflicts which ive been too lazy to delete
actually untracking those branches doesnt seem to have changed anything
j
so we also at this point in the command make a network call to ensure the PR statuses are up to date
if the old branches weren't the bottleneck, that might be
a
theres a request I see in the logs that looks like:
and in the
prHeadRefNames
field it seems to be sending a list of like every branch ive ever had
j
yeah, it should only be tracked branches
a
hmnm, it does seem like those branches still exist locally but im not sure if theyre tracked
one I just spot checked definitely isnt
j
ah, that might be the issue then. i'll make sure we only include tracked branches in the query
deleting them with
git branch -d
would be the workaround
a
so basically this request is asking the graphite API for the status of the PRs for these branches?
j
yes
a
also not sure if this is relevant but generally we dont actually use graphite to manage our PRs and still go through github for merges
so im not sure if theres maybe some caching layer being skipped here
j
thats fine, we pass through to github
a
cool. yeah so then I think its just a case of having switched to graphite after a year or so of this repo, meaning i have hundreds of old branches laying around
👍 1
deleting all the branches fixed the problem 👌