Re: [PATCH 3/2] Optimize the two-way merge of git-read-tree too

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Git Mailing List <git@...>
Date: Saturday, August 11, 2007 - 1:27 pm

On Sat, 11 Aug 2007, Junio C Hamano wrote:

I'd love to see this, because it would likely speed up merging of really 
big trees by a huge amount, and because I think it's fundamentally the 
"right thing(tm)" to do.

That said, right now we do so well that it's almost not interesting. The 
kernel tree is so small as to merge in basically zero time even when you 
do per-file merges, and generatign the diffstat is almost always the 
biggest component of the merge by far.

But yes, for bigger trees, and just because it's the right thing to do 
considering the data structures we have, we really should plan on doing 
that some day. I think that with the current optimizations (and at least 
with current hardware - old hw might change the equation), based on my 
timings on the "bummer" tree, are fine at _least_ to 100,000 files. But if 
we're talking about slower hardware, or many more files than that, we 
should _definitely_ eventually do the tree-based optimizations.


Yeah. "git diff" is just about the most performance-critical one. That 
said, the "--cached" case is likely the least used one, and any time you 
don't use that, you end up having to lstat() the files anyway, so you 
cannot do the tree-based optimizations ;^p

But it would help "git status", I think (which needs to do both --cached 
and the normal one).

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/2] Optimize the common cases of git-read-tree, Linus Torvalds, (Fri Aug 10, 3:21 pm)
Re: [PATCH 3/2] Optimize the two-way merge of git-read-tree ..., Linus Torvalds, (Sat Aug 11, 1:27 pm)