environment.c: enable core.preloadindex by default
authorSteve Hoelzer <shoelzer@gmail.com>
Mon, 2 Jun 2014 16:43:00 +0000 (11:43 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2014 17:06:53 +0000 (10:06 -0700)
Many people are on filesystems with horrible stat latency (not
limited to Windows but also NFS), which core.preloadindex was
designed to help. We discussed enabling it by default early in 2013
but didn't.

Per

http://thread.gmane.org/gmane.comp.version-control.git/219273/focus=219322

let's enable the setting by default, with the original choice of max
20 threads / min 500 paths per thread parameters.

Signed-off-by: Steve Hoelzer <shoelzer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
environment.c
index 1932e9b9a2be5437dd467f91472318a5bf1bb992..4b3d965c3de46ea16a36501876170a476ea4e062 100644 (file)
@@ -613,9 +613,9 @@ core.preloadindex::
 +
 This can speed up operations like 'git diff' and 'git status' especially
 on filesystems like NFS that have weak caching semantics and thus
-relatively high IO latencies.  With this set to 'true', Git will do the
+relatively high IO latencies.  When enabled, Git will do the
 index comparison to the filesystem data in parallel, allowing
-overlapping IO's.
+overlapping IO's.  Defaults to true.
 
 core.createObject::
        You can set this to 'link', in which case a hardlink followed by
index 5c4815dbe132fc358aa55eeb20d86d867c97c37f..1c686c9095bc82a056a2e0e5f085b6992cb4c3b0 100644 (file)
@@ -71,7 +71,7 @@ unsigned long pack_size_limit_cfg;
 char comment_line_char = '#';
 
 /* Parallel index stat data preload? */
-int core_preload_index = 0;
+int core_preload_index = 1;
 
 /* This is set by setup_git_dir_gently() and/or git_default_config() */
 char *git_work_tree_cfg;