Re: [PATCH] pack-objects: no crc check when the cached version is used

2013-09-13 Thread Nicolas Pitre
On Sat, 14 Sep 2013, Duy Nguyen wrote: > On Sat, Sep 14, 2013 at 4:26 AM, Thomas Rast wrote: > > I tried the perf script below, but at least for the git repo the only > > thing I can see is noise. > > --stdout does not set do_check_packed_object_crc, you need to run > pack-objects without --stdo

Re: [PATCH] pack-objects: no crc check when the cached version is used

2013-09-13 Thread Duy Nguyen
On Sat, Sep 14, 2013 at 4:26 AM, Thomas Rast wrote: > Junio C Hamano writes: > >> Nguyễn Thái Ngọc Duy writes: >> >>> Current code makes pack-objects always do check_pack_crc() in >>> unpack_entry() even if right after that we find out there's a cached >>> version and pack access is not needed.

Re: [PATCH] pack-objects: no crc check when the cached version is used

2013-09-13 Thread Thomas Rast
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> Current code makes pack-objects always do check_pack_crc() in >> unpack_entry() even if right after that we find out there's a cached >> version and pack access is not needed. Swap two code blocks, search >> for cached version first, the

Re: [PATCH] pack-objects: no crc check when the cached version is used

2013-09-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Current code makes pack-objects always do check_pack_crc() in > unpack_entry() even if right after that we find out there's a cached > version and pack access is not needed. Swap two code blocks, search > for cached version first, then check crc. > > Signed-off-by:

[PATCH] pack-objects: no crc check when the cached version is used

2013-09-13 Thread Nguyễn Thái Ngọc Duy
Current code makes pack-objects always do check_pack_crc() in unpack_entry() even if right after that we find out there's a cached version and pack access is not needed. Swap two code blocks, search for cached version first, then check crc. Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1_file.c | 2