Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is git core.preloadindex default value false?

Tags:

git

defaults

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

like image 553
Tom Whittock Avatar asked Aug 15 '13 16:08

Tom Whittock


2 Answers

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.

like image 89
manojlds Avatar answered Sep 25 '22 00:09

manojlds


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

like image 42
Alexander Bird Avatar answered Sep 24 '22 00:09

Alexander Bird