Re: [PATCH v4 4/9] index-helper: new daemon for caching index and related stuff

2015-11-02 Thread David Turner
On Sun, 2015-11-01 at 14:42 +0100, Nguyễn Thái Ngọc Duy wrote: > + memcpy(new_mmap, istate->mmap, istate->mmap_size - 20); > + > + /* > + * The trailing hash must be written last after everything is > + * written. It's the indication that the shared memory is now > + * ready.

[PATCH v4 4/9] index-helper: new daemon for caching index and related stuff

2015-11-01 Thread Nguyễn Thái Ngọc Duy
Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. Read time is reduced by 70%. The biggest gain is not having to verify the trailing SHA-1, which takes lots of