[PATCH 17/32] read-cache: split-index mode

2014-06-13 Thread Nguyễn Thái Ngọc Duy
This split-index mode is designed to keep write cost proportional to the number of changes the user has made, not the size of the work tree. (Read cost is another matter, to be dealt separately.) This mode stores index info in a pair of $GIT_DIR/index and $GIT_DIR/sharedindex.. sharedindex is larg

Re: [PATCH 17/32] read-cache: split-index mode

2014-04-30 Thread Junio C Hamano
Duy Nguyen writes: > when no entry is reused). I kinda hope to avoid that. I see. > Speaking about > reusing cache_entry, we won't be able to share cache_entry because > when it's freed in replace_index_entry, or remove_index_entry_at in > the main index, we need to locate the same entry in the

Re: [PATCH 17/32] read-cache: split-index mode

2014-04-29 Thread Duy Nguyen
On Wed, Apr 30, 2014 at 12:23 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >>> I do think it is sensible to keep two arrays of "struct cache_entry" >>> around (one for base and one for incremental changes) inside >>> index_state, and the patch seems to do so via "struct split_index" >>> that

Re: [PATCH 17/32] read-cache: split-index mode

2014-04-29 Thread Junio C Hamano
Duy Nguyen writes: >> I do think it is sensible to keep two arrays of "struct cache_entry" >> around (one for base and one for incremental changes) inside >> index_state, and the patch seems to do so via "struct split_index" >> that does have a copy of saved_cache. If the write-out codepath >> w

Re: [PATCH 17/32] read-cache: split-index mode

2014-04-28 Thread Duy Nguyen
On Tue, Apr 29, 2014 at 5:46 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> diff --git a/cache.h b/cache.h >> index 0f6247c..90a5998 100644 >> --- a/cache.h >> +++ b/cache.h >> @@ -135,6 +135,7 @@ struct cache_entry { >> unsigned int ce_mode; >> unsigned int ce_flags;

Re: [PATCH 17/32] read-cache: split-index mode

2014-04-28 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/cache.h b/cache.h > index 0f6247c..90a5998 100644 > --- a/cache.h > +++ b/cache.h > @@ -135,6 +135,7 @@ struct cache_entry { > unsigned int ce_mode; > unsigned int ce_flags; > unsigned int ce_namelen; > + unsigned int index; /

[PATCH 17/32] read-cache: split-index mode

2014-04-28 Thread Nguyễn Thái Ngọc Duy
This split-index mode is designed to keep write cost proportional to the number of changes the user has made, not the size of the work tree. (Read cost is another matter, to be dealt separately.) This mode stores index info in a pair of $GIT_DIR/index and $GIT_DIR/sharedindex.. sharedindex is larg