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

Re: Git is not scalable with too many refs/*

From: Julian Phillips <hidden>
Date: 2016-06-15 22:52:07

Possibly related (same subject, not in this thread)

On Tue, 27 Sep 2011 13:07:15 +0200, Michael Haggerty wrote:
On 09/27/2011 11:01 AM, Julian Phillips wrote:
quoted
It has to be hot-cache, otherwise time taken to read the refs from 
disk
will mean that it is always slow.  On my Mac it seems to _always_ be
slow reading the refs from disk, so even the "fast" case still takes 
~17m.
This case should be helped by lazy-loading of loose references, which 
I
am working on.  So if you develop some benchmarking code, it would 
help
me with my work.
The attached script creates the repo structure I was testing with ...

If you create a repo with 100k refs it takes quite a while to read the 
refs from disk.  If you are lazy-loading then it should take practically 
no time, since the only interesting ref is refs/heads/master.

The following is the hot-cache timing for "./refs-stress c 40000", with 
the sorting patch applied (wasn't prepared to wait for numbers with 100k 
refs).

jp3@rayne: refs>(cd c; time ~/misc/git/git/git branch)
* master

real    0m0.885s
user    0m0.161s
sys     0m0.722s

After doing "rm -rf c/.git/refs/changes/*", I get:

jp3@rayne: refs>(cd c; time ~/misc/git/git/git branch)
* master

real    0m0.004s
user    0m0.001s
sys     0m0.002s

-- 
Julian

Attachments

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