Re: git fetch slow as molasses due to tag downloading
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 14, 2006, 16:05 UTC
- Message-ID
- <Pine.LNX.4.63.0612141701440.3635@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <elrr8j$a02$1@sea.gmane.org>
Hi,
On Thu, 14 Dec 2006, Han-Wen Nienhuys wrote:
Show 11 quoted lines
> just upgraded our autobuilder from 1.4.3 to 1.4.4.2. > > Now, our standard download command comes to a complete halt. Judging > >from the "ps -ef" apparently, it does > > git-show-ref --verify --quiet -- [TAG] > > This is done for every one of the 1500 tags that are in my repository. > At approx 20 tags per second this takes an awful lot of time. > > 1. Is this necessary?
Yes. The purpose is to check which tags have not yet been fetched.
> 2. Is this efficient? Wouldn't doing all tags in a single git-show-ref > invocation be potentially quicker?
It is not efficient. But it cannot be solved like you propose, since it is inside a loop, and a "continue" is executed when the tag exists already.
IMHO this should be solved as a filter: "git-show-ref --stdin --show-invalid". Thus, git does not have to traverse _every_ ref for _every_ incoming tag.
Ciao, Dscho