diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-09 15:11:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-09 20:42:39 -0700 |
commit | 53996fe5397ff37c5934bb5e9b23ef5985b3d152 (patch) | |
tree | b3b963e2f98e135af5d036f349d2462164435189 /builtin-merge-base.c | |
parent | Avoid unnecessary 'lstat()' calls in 'get_stat_data()' (diff) | |
download | tgif-53996fe5397ff37c5934bb5e9b23ef5985b3d152.tar.xz |
Teach 'git checkout' to preload the index contents
This makes git checkout know to use the threaded index preloading if it
is enabled in the config file. You need to have
[core]
preloadindex = true
in your config file to see it, and for that feature to make sense your
filesystem needs to be able to do concurrent 'lstat()' lookups, but when
that is the case (especially NFS over a high-latency network), this can
be a noticeable performance win.
But with a low-latency network and at least older Linux NFS clients, this
will clearly potentially cause a lot of lock contention. It may still
speed up the uncached case, but the threading and locking overhead will
result in the cached case likely slowing down.
That was almost certainly fixed by Linux commit fc0f684c2 ("NFS: Remove
BKL from NFS lookup code"), but that one got merged into 2.6.27-rc1, so
older kernel versions than 2.6.27 will not scale very well.
But regardless, it's the right thing to do. If your filesystem doesn't
scale, don't enable index preloading.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge-base.c')
0 files changed, 0 insertions, 0 deletions