Thread (38 messages) flat view 38 messages, 14 authors, 2016-06-15

Re: Performance issue of 'git branch'

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:05

Possibly related (same subject, not in this thread)

Linus Torvalds [off-list ref] writes:
On Wed, 22 Jul 2009, Linus Torvalds wrote:
quoted
Ooh yes. That would do it. It's going to peel and look up every single ref 
it finds, so it's going to look up _hundreds_ of objects (all the tags, 
all the commits they point to, etc etc). Even if it then only shows a 
couple of branches.

Junio, any ideas?
I had one of my own.
It seems that I missed all the fun while going out to dinner.
It uses the "raw" version of 'for_each_ref()' (which doesn't verify that 
the ref is valid), and then does the "type verification" before it starts 
doing any gentle commit lookup.
Hmm, we now have to remember what this patch did, if we ever wanted to
introduce negative refs later (see ef06b91 do_for_each_ref: perform the
same sanity check for leftovers., 2006-11-18).  Not exactly nice to spread
the codepaths that need to be updated.  Is the cold cache performance of
"git branch" to list your local branches that important?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help