Re: name-rev --stdin is slow
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Jun 19, 2008, 23:00 UTC
- Message-ID
- <alpine.LNX.1.00.0806191849540.19665@iabervon.org>
- In-Reply-To
- <485AD90E.6000309@gmail.com>
On Fri, 20 Jun 2008, Lea Wiemann wrote:
Show 8 quoted lines
> Daniel Barkalow wrote: > > Actually, I think it's the reverse: without --stdin, name-rev can do a first > > pass that lets it eliminate a lot of data from consideration; with --stdin, > > it doesn't know if an item it hasn't seen is going to need some data, and so > > it's conservative and doesn't eliminate anything, > > Are you sure that's the case? time git-name-rev --stdin < /dev/null gives the > same high startup time without looking up anything.
Ah, okay. There's a startup pass that goes through all of the refs (tags in particular), and does stuff with them, but only if they aren't filtered out.
> Anyways, it would be great if someone could try to fix that, since a 6-second > startup time on a repository like linux-2.6 makes the --stdin option unusable > for applications like gitweb (for which it would actually be quite useful to > reduce the number of forks).
It might be possible to collect all of the input, set up the filter, and do the (now cheaper) initial pass, but I don't think that would offer any real advantage over just collecting them in the caller and calling name-rev with a long command line.
-Daniel *This .sig left intentionally blank*