Re: [PATCH v3 3/4] read-cache: load cache extensions on a worker thread

2018-09-08 Thread Ben Peart
On 9/7/2018 5:10 PM, Junio C Hamano wrote: Ben Peart writes: +struct load_index_extensions +{ +#ifndef NO_PTHREADS + pthread_t pthread; +#endif + struct index_state *istate; + void *mmap; + size_t mmap_size; + unsigned long src_offset; If the file format

Re: [PATCH v3 3/4] read-cache: load cache extensions on a worker thread

2018-09-07 Thread Junio C Hamano
Ben Peart writes: > +struct load_index_extensions > +{ > +#ifndef NO_PTHREADS > + pthread_t pthread; > +#endif > + struct index_state *istate; > + void *mmap; > + size_t mmap_size; > + unsigned long src_offset; If the file format only allows uint32_t on any platform, perhaps

[PATCH v3 3/4] read-cache: load cache extensions on a worker thread

2018-09-06 Thread Ben Peart
This patch helps address the CPU cost of loading the index by loading the cache extensions on a worker thread in parallel with loading the cache entries. In some cases, loading the extensions takes longer than loading the cache entries so this patch utilizes the new EOIE to start the thread to