Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-29 Thread Christian Couder
On Tue, Oct 25, 2016 at 12:16 PM, Duy Nguyen wrote: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > wrote: >> @@ -2233,7 +2263,8 @@ int write_locked_index(struct index_state *istate, >> struct lock_file *lock, >> if ((v & 15)

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-29 Thread Christian Couder
On Sun, Oct 23, 2016 at 6:07 PM, Ramsay Jones wrote: >> >> +int too_many_not_shared_entries(struct index_state *istate) > > This function is a file-loacal symbol; could you please make it > a static function. Ok, it will be in the next version. Thanks, Christian.

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-25 Thread Duy Nguyen
On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder wrote: > @@ -2233,7 +2263,8 @@ int write_locked_index(struct index_state *istate, > struct lock_file *lock, > if ((v & 15) < 6) > istate->cache_changed |= SPLIT_INDEX_ORDERED; >

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-23 Thread Ramsay Jones
On 23/10/16 10:26, Christian Couder wrote: > When writing a new split-index and there is a big number of cache > entries in the split-index compared to the shared index, it is a > good idea to regenerate the shared index. > > By default when the ratio reaches 20%, we will push back all > the

[PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-23 Thread Christian Couder
When writing a new split-index and there is a big number of cache entries in the split-index compared to the shared index, it is a good idea to regenerate the shared index. By default when the ratio reaches 20%, we will push back all the entries from the split-index into a new shared index file