Thread (22 messages) flat view 22 messages, 10 authors, 2016-06-15

Re: q: faster way to integrate/merge lots of topic branches?

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:45:00


On Wed, 23 Jul 2008, Linus Torvalds wrote:
But I'll look if there's a way to cut it down from 9s. I suspect it has to 
traverse the whole history to make 100% sure that something isn't merged, 
but even that should be faster than 9s.
Heh. It should be trivially doable _much_ faster, but the has_commit() 
logic really relies on re-doing the "in_merge_base()" thing over and over 
again (clearing the bits), instead of just populating the object list with 
a "already seen" bit and lettign that expand over time.

So using "git branch --no-merged" does avoid re-parsing the commits over 
and over again (which is a pretty big win), but the way the code is 
written it does end up traversing the commit list fully for every single 
branch. That's quite horrible.

Lars added to Cc list in the hope that he'll be embarrassed enough about 
the performance to try to fix it ;)

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help