Re: [PATCH v3 10/21] read-cache: regenerate shared index if necessary

2017-01-02 Thread Christian Couder
On Tue, Dec 27, 2016 at 8:08 PM, Junio C Hamano wrote: > Christian Couder writes: > >> + case 0: >> + return 1; /* 0% means always write a new shared index */ >> + case 100: >> + return 0; /* 100% means never write a new shared index */ >> + default: >> +

Re: [PATCH v3 10/21] read-cache: regenerate shared index if necessary

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > + case 0: > + return 1; /* 0% means always write a new shared index */ > + case 100: > + return 0; /* 100% means never write a new shared index */ > + default: > + ; /* do nothing: just use the configured value */ > +

[PATCH v3 10/21] read-cache: regenerate shared index if necessary

2016-12-26 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 in