We have a git repo that have more than 30 thousands branches.
When i run time git clone http://<gerrit-host>/manifest.git, it stop at Cloning into 'manifest'... for about 1 minutes and 20 seconds, and this command totally cost 1m45s.
For my purpose, I only want to download branch_ci which has only one file of default.xml. So I try:
time git clone -b branch_ci --single-branch --depth 1 http://<gerrit-host>/manifest.git
the total cost is still 1m18s.
I know if I clone full repo from remote, it definitely should be slow. But I think If I only clone one branch which have only one file and little commits, shouldn't it be much faster?
How can I improve the performance of only one branch clone if remote has so many branches? Or this is the branch implementation of git that lead to this bad performance.
I've already checked this Impact of large number of branches in a git repo?, but not get any idea.