Re: [PATCH 0/3] Supplements to "packed_ref_cache: don't use mmap() for small files"

2018-01-17 Thread Junio C Hamano
Michael Haggerty writes: > So I will follow up this email with three patches: > > 1. Mention that `snapshot::buf` can be NULL for empty files > >I suggest squashing this into your patch, to make it clear that >`snapshot::buf` and `snapshot::eof` can also be NULL if

Re: [PATCH 0/3] Supplements to "packed_ref_cache: don't use mmap() for small files"

2018-01-17 Thread Johannes Schindelin
Hi Michael, On Mon, 15 Jan 2018, Michael Haggerty wrote: > Thanks for your patch. I haven't measured the performance difference > of `mmap()` vs. `read()` for small `packed-refs` files, but it's not > surprising that `read()` would be faster. > > I especially like the fix for zero-length

[PATCH 0/3] Supplements to "packed_ref_cache: don't use mmap() for small files"

2018-01-15 Thread Michael Haggerty
Thanks for your patch. I haven't measured the performance difference of `mmap()` vs. `read()` for small `packed-refs` files, but it's not surprising that `read()` would be faster. I especially like the fix for zero-length `packed-refs` files. (Even though AFAIK Git never writes such files, they