author | Nicolas Pitre <nico@cam.org> | |
Sun, 18 Mar 2007 01:13:57 +0000 (21:13 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 18 Mar 2007 22:36:59 +0000 (15:36 -0700) | ||
commit | a0cba10847c85b0becc3c7045a423e3dc8a8f4ae | |
tree | 701e3f5a75cb3c77c65485ef72133d913a265327 | tree | snapshot |
parent | e5e01619bcb753a3c45fb51d498371c9ff0677da | commit | diff |
Reuse cached data out of delta base cache.
A malloc() + memcpy() will always be faster than mmap() +
malloc() + inflate(). If the data is already there it is
certainly better to copy it straight away.
With this patch below I can do 'git log drivers/scsi/ >
/dev/null' about 7% faster. I bet it might be even more on
those platforms with bad mmap() support.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
A malloc() + memcpy() will always be faster than mmap() +
malloc() + inflate(). If the data is already there it is
certainly better to copy it straight away.
With this patch below I can do 'git log drivers/scsi/ >
/dev/null' about 7% faster. I bet it might be even more on
those platforms with bad mmap() support.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |