Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-05 Thread Junio C Hamano
Junio C Hamano writes: > David Turner writes: > >> But this is a benchmark of just git_path. I don't happen to see any >> cases where git_path is taking up an appreciable amount of runtime. >> >> I only added this because Junio requested a speedup. So I am perfectly >> happy to drop this patch

Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-05 Thread Junio C Hamano
David Turner writes: > But this is a benchmark of just git_path. I don't happen to see any > cases where git_path is taking up an appreciable amount of runtime. > > I only added this because Junio requested a speedup. So I am perfectly > happy to drop this patch from the series. Ok, then let

Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-05 Thread David Turner
On Mon, 2015-10-05 at 10:22 -0700, Junio C Hamano wrote: > Michael Haggerty writes: > > > For this particular application, where we only have 19 strings to store, > > I suppose we could tolerate the use of approximately 64k of RAM to store > > 174 characters worth of strings *if* it would bring u

Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-05 Thread Junio C Hamano
Michael Haggerty writes: > For this particular application, where we only have 19 strings to store, > I suppose we could tolerate the use of approximately 64k of RAM to store > 174 characters worth of strings *if* it would bring us big time savings. > But I think we need some evidence of the time

Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-04 Thread Michael Haggerty
On 09/01/2015 04:13 AM, David Turner wrote: > Instead of a linear search over common_list to check whether > a path is common, use a trie. The trie search operates on > path prefixes, and handles excludes. Here I am, coming late to the discussion as usual. Sorry for that. I dug into this code ye

[PATCH v5 2/3] path: optimize common dir checking

2015-08-31 Thread David Turner
Instead of a linear search over common_list to check whether a path is common, use a trie. The trie search operates on path prefixes, and handles excludes. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- path.c| 227 ++--