Re: Performance issue of 'git branch'
- From
- Carlos R. Mafra <crmafra2@gmail.com>
- Date
- Jul 23, 2009, 05:17 UTC
- Message-ID
- <20090723051717.GA20063@Pilar.aei.mpg.de>
- In-Reply-To
- <alpine.LFD.2.01.0907222050500.21520@localhost.localdomain>
On Wed 22.Jul'09 at 21:10:49 -0700, Linus Torvalds wrote:
Show 13 quoted lines
> Enabled with 'GIT_USE_LOOKUP'. But it seems to give worse performance, > despite giving me fewer searches: I get 2121 probes with binary searching, > but only 1325 with the newton-raphson method (for the non-fixed 'git > branch' case). > > Using GIT_USE_LOOKUP actually results in fewer pagefaults (1391 vs 1473), > but it's still slower. Interesting. Carlos, try it on your machine (just > do > > export GIT_USE_LOOKUP=1 > time git branch > > to try it, and 'unset GIT_USE_LOOKUP' to disable it.
GIT_USE_LOOKUP=1 makes is a bit slower overall.
Without your patch, I get fewer pagefaults (1254 vs 1404) when it is set, but it takes ~0.5s longer (it varies a bit).
> With my fix to 'git branch', it doesn't matter. I get the same > performance, and same number of page faults (676) regardless. So my patch > makes the GIT_USE_LOOKUP=1 thing irrelevant.
With your patch and GIT_USE_LOOKUP=1 I get 751 pagefaults, versus 775 if GIT_USE_LOOKUP is unset, but it is faster when unset.
So your patch without GIT_USE_LOOKUP=1 is the fastest option.