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

Re: [PATCH] refs.c: get_ref_cache: use a bucket hash

From: Andreas Krey <hidden>
Date: 2016-06-15 23:04:10

Possibly related (same subject, not in this thread)

On Mon, 16 Mar 2015 10:23:05 +0000, Junio C Hamano wrote:
Andreas Krey [off-list ref] writes:
...
say "a lot of ignored directories", but do you mean directories in
the working tree (which I suppose do not have much to do with the
submodule_ref_caches[])?
Apparently, they do.
I am guessing that the repository has tons
of submodules?
Not a single one. Thats's thie interesting thing that
makes me think I'm not actually solving the right problem.

This repo has about 100k subdirectories that are ignored
(I don't know whether directly or within ignored dirs),
and strace said that git looks for '.git/HEAD' and one
other file in each of these. Apparently it trieds to
find out if any of these dirs happen to be a git repo
which git clean treats specially, but it seems it also
calls get_ref_cache for each of these dires even though
the turn out not to be a sub-repo.

In other words: I suspect that get_ref_cache shouldn't
be called that often, or that the cache entries should
be removed once a directory is found not to be a sub repo.
Then the linear list wouldn't really hurt.

I'll look into that tomorrow, and also into the hashmap API.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help