Skip to content

Commit 299e298

Browse files
shoelzergitster
authored andcommitted
environment.c: enable core.preloadindex by default
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>
1 parent e156455 commit 299e298

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/config.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,9 @@ core.preloadindex::
613613
+
614614
This can speed up operations like 'git diff' and 'git status' especially
615615
on filesystems like NFS that have weak caching semantics and thus
616-
relatively high IO latencies. With this set to 'true', Git will do the
616+
relatively high IO latencies. When enabled, Git will do the
617617
index comparison to the filesystem data in parallel, allowing
618-
overlapping IO's.
618+
overlapping IO's. Defaults to true.
619619

620620
core.createObject::
621621
You can set this to 'link', in which case a hardlink followed by

environment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ unsigned long pack_size_limit_cfg;
7171
char comment_line_char = '#';
7272

7373
/* Parallel index stat data preload? */
74-
int core_preload_index = 0;
74+
int core_preload_index = 1;
7575

7676
/* This is set by setup_git_dir_gently() and/or git_default_config() */
7777
char *git_work_tree_cfg;

0 commit comments

Comments
 (0)