From: Michael J Gruber Date: Tue, 30 Aug 2011 10:04:54 GMT Subject: Re: [PATCH 0/3] Un-pessimize "diff-index $commit -- $pathspec" Message-ID: <4E5CB5C6.6020403@drmicha.warpmail.net> In-Reply-To: <1314653603-7533-1-git-send-email-gitster@pobox.com> Junio C Hamano venit, vidit, dixit 29.08.2011 23:33: > "git diff A B -- $pathspec" to compare two tree-ishes knew how to apply > pathspec to avoid opening trees that fall outside the area of interest, > but "git diff A -- $pathspec" used unpack_trees() machinery that was meant > for full-tree merges, and ended up reading the whole tree only to discard > potentially major part of the work it does. Seems my analysis wasn't that far off (though, admittedly, unspecific): MG: > Well, we have to read the full tree before diffing. But I can't ... > I meant: The way "git diff" is now, it does that. JC: > anything to do with it (iow, your "The way 'git diff' is now, it does > that" is not just incorrect---we don't read the full tree to begin > with---but irrelevant). Anyways, as MR writes: MR: > 30s without patch and 0.3s with it. You rock ;) I agree with all of that ;) Michael