Re: Performance issue of 'git branch'
- From
- Carlos R. Mafra <crmafra2@gmail.com>
- Date
- Jul 23, 2009, 16:53 UTC
- Message-ID
- <20090723165335.GA15598@Pilar.aei.mpg.de>
- In-Reply-To
- <alpine.LFD.2.01.0907230913230.21520@localhost.localdomain>
On Thu 23.Jul'09 at 9:19:21 -0700, Linus Torvalds wrote:
Show 5 quoted lines
> > > > and notice how that makes my pitiful harddisc look like Linus' SSD! And the > > result is the same. > > The result is the same, yes, but it doesn't do error checking.
Oh, I see.
Show 5 quoted lines
> So we _could_ make 'git branch' not actually read and verify the commits. > It doesn't strictly _need_ to, unless you use 'git branch -v' or > something. That would speed it up further, but the verification is nice, > and as long as performance isn't _horrible_ I think we're better off doing > it.
Right, but I would definitely like having some option like --dont-check to 'git branch', and I think I would use it as default (unless experience tells that errors happen often).
> After all, you'll see the problem only once.
True, but paradoxically that is also the reason why I notice it and makes it feel bad.
Everytime I did the first 'git branch' those 5 seconds really hurt, because I wondered why it couldn't be done in 0s like subsequent commands.
But sure, this was definitely not a pressing issue and your patch made it even less. I am happy that it takes 1s now, and I really appreciated your patch!
Thanks, Carlos