Re: performance problem: "git commit filename"
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 14, 2008, 17:07 UTC
- Message-ID
- <alpine.LFD.1.00.0801140902140.2806@woody.linux-foundation.org>
- In-Reply-To
- <7vr6glnrvp.fsf@gitster.siamese.dyndns.org>
On Sun, 13 Jan 2008, Junio C Hamano wrote:
> > I've reworked the patch, and in the kernel repository, a > single-path commit after touching that path now calls 23k > lstat(2). It used to call 46k lstat(2) after your fix.
Ok, I really like what the patch does, and how it looks.
At the same time, I *really* hate how we now edit the cache entries in place for these kinds of things that really have nothing to do with the on-disk format. That's not a new thing (CE_UPDATE is the same), but it definitely got uglier.
So I think this patch is good, but I think it would be even better if we just bit the bullet and started looking at having a different in-memory representation from the on-disk one. Possibly not *that* much different: perhaps just keeping a pointer to the on-disk one along with a flags value.
That would be a fairly painful change, though (and quite independent from this particular one - apart from the fact that CE_UPTODATE is one of the users that could be cleaned up if we did that).
Comments?
Linus