Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-31 Thread David Turner
On Sun, 2015-08-30 at 08:25 +0200, Torsten Bögershausen wrote: > On 26.08.15 21:46, 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. > > > > Signed-off-by: Da

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-29 Thread Torsten Bögershausen
On 26.08.15 21:46, 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. > > Signed-off-by: David Turner > --- > path.c| 226 > +++

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-28 Thread David Turner
On Fri, 2015-08-28 at 09:39 -0700, Junio C Hamano wrote: > David Turner writes: > > > On Wed, 2015-08-26 at 18:10 -0400, David Turner wrote: > >> On Wed, 2015-08-26 at 14:15 -0700, Junio C Hamano wrote: > >> > > + * For example, consider the following set of strings: > >> > > + * abc > >> > > + *

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-28 Thread Junio C Hamano
David Turner writes: > On Wed, 2015-08-26 at 18:10 -0400, David Turner wrote: >> On Wed, 2015-08-26 at 14:15 -0700, Junio C Hamano wrote: >> > > + * For example, consider the following set of strings: >> > > + * abc >> > > + * def >> > > + * definite >> > > + * definition >> > > + * >> > > + * Th

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-26 Thread David Turner
On Wed, 2015-08-26 at 18:10 -0400, David Turner wrote: > On Wed, 2015-08-26 at 14:15 -0700, Junio C Hamano wrote: > > > + * For example, consider the following set of strings: > > > + * abc > > > + * def > > > + * definite > > > + * definition > > > + * > > > + * The trie would look look like: > >

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-26 Thread Junio C Hamano
David Turner writes: > On Wed, 2015-08-26 at 14:15 -0700, Junio C Hamano wrote: > >> Thanks for a pleasant read. > > Thank you! I'll re-roll with those last two fixes (re value=NULL) > tomorrow-ish. If these two "value = NULL" are the only things, I can locally fix them up. No need to resend.

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-26 Thread David Turner
On Wed, 2015-08-26 at 14:15 -0700, Junio C Hamano wrote: > > + * For example, consider the following set of strings: > > + * abc > > + * def > > + * definite > > + * definition > > + * > > + * The trie would look look like: > > + * root: len = 0, value = (something), children a and d non-NULL. > >

Re: [PATCH v4 2/4] path: optimize common dir checking

2015-08-26 Thread Junio C Hamano
David Turner writes: > 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 > --- > path.c| 226 >

[PATCH v4 2/4] path: optimize common dir checking

2015-08-26 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 --- path.c| 226 ++ t/t0060-path-utils.sh | 1