20

Can anyone answer why core.preloadindex is false by default? Are there any pitfalls? I can't imagine a performance penalty.

Tom Whittock
  • 4,081
  • 19
  • 24

2 Answers2

20

Why is it not default - well, it was introduced in 2008, and they did it to improve performance on weak filesystems like NFS, and... Linus is of the opinion that it should be made default now - http://git.661346.n2.nabble.com/git-status-takes-30-seconds-on-Windows-7-Why-tp7580816p7580853.html

I wonder if preloadindex shouldn't be enabled by default.. It's a huge deal on NFS, and the only real downside is that it expects threading to work. It potentially slows things down a tiny bit for single-CPU cases with everything cached, but that isn't likely to be a relevant case.

manojlds
  • 290,304
  • 63
  • 469
  • 417
9

Git 2.1.0 made it's default value 'true' now:

https://git.kernel.org/cgit/git/git.git/tree/Documentation/RelNotes/2.1.0.txt

Alexander Bird
  • 38,679
  • 42
  • 124
  • 159