Project with many branches can lock server running "git branch --contains XXX"
ZD: https://gitlab.zendesk.com/agent/tickets/82394
From the developer:
"Another GitLab issue that surfaces on a repository with many branches
Displaying a commit XXXX asynchronously starts a `git branch --contains XXXX` process on the
server. On a repo with thousands of branches (and long history) this operation
can take tens of minutes to complete. At some point the request times out and
the spinner in the UI disappears, but the git process keeps running pegging a
CPU core. The main concern here is that on a reasonably busy repo these left-over
git processes will soon consume all CPU resources on the server.
I see two ways to go with this; either make the `git branch --contains`
operation more efficient or suppress the operation; be that by configuration or
detection."
I think we should probably just not load this information if the total branch count exceeds a threshold (e.g. 1000).