From: Junio C Hamano Date: Sun, 13 Jan 2008 11:09:19 GMT Subject: Re: performance problem: "git commit filename" Message-ID: <7vy7auoucg.fsf@gitster.siamese.dyndns.org> In-Reply-To: <7vd4s6qal0.fsf@gitster.siamese.dyndns.org> Junio C Hamano writes: > The fact that we write out a temporary index and then rebuild > the real index means CE_UPTODATE flag we populate in the > temporary index is lost and we still need to lstat(2) while > building the real index, which is a bit unfortunate. I suspect > that we can use the one-way merge to reset the index when > building the real index after we are done building the temporary > index, instead of discarding the in-core temporary index and > re-reading the real index. This comment is completely bogus. With your earlier one-way merge fix, as the way CE_UPTODATE patch was written we preserve in-core CE_UPTODATE bit across write_index(), the code already should be taking advantage of an earlier lstat(2).