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.
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
2 matches
Mail list logo