summaryrefslogtreecommitdiffstats
path: root/builtin-show-ref.c
diff options
context:
space:
mode:
authorDmitry Potapov <dpotapov@gmail.com>2010-02-21 07:32:19 +0100
committerJunio C Hamano <gitster@pobox.com>2010-02-21 20:39:10 +0100
commitea68b0ce9f8ce8da3e360aed3cbd6720159ffbee (patch)
tree0b2e4380a4bcd4933c0f85440c033def07fc090a /builtin-show-ref.c
parentGit 1.7.0 (diff)
downloadgit-ea68b0ce9f8ce8da3e360aed3cbd6720159ffbee.tar.xz
git-ea68b0ce9f8ce8da3e360aed3cbd6720159ffbee.zip
hash-object: don't use mmap() for small files
Using read() instead of mmap() can be 39% speed up for 1Kb files and is 1% speed up 1Mb files. For larger files, it is better to use mmap(), because the difference between is not significant, and when there is not enough memory, mmap() performs much better, because it avoids swapping. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-show-ref.c')
0 files changed, 0 insertions, 0 deletions