Tremendous speedup to git on Windows

1,657 views
Skip to first unread message

Gabriel Charette

unread,
Aug 5, 2015, 7:06:06 PM8/5/15
to Chromium-dev
My git was getting extremely slow as of late on Windows (10+ seconds to do any basic commands).

I found this article on stack overflow, ran the 3 commands below and now it's tremendously faster:
$ git config --global core.preloadindex true
$ git config --global core.fscache true
$ git config --global gc.auto 256

Does anybody know of any disadvantage to using those configs?

Should we make those default? I'm pretty sure it's not the reduced gc.auto as it was immediately faster without even doing a single gc.

Cheers,
Gab

Paweł Hajdan, Jr.

unread,
Aug 6, 2015, 9:16:51 AM8/6/15
to Gabriel Charette, infr...@chromium.org, Chromium-dev
+infra-dev

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Hendrik Wagenaar

unread,
Aug 6, 2015, 9:37:14 AM8/6/15
to Chromium-dev
FWIW, I don't remember setting these in my Windows config and I have core.preloadindex=true and core.fscache=true, maybe they're already default?

I don't have gc.auto set.

Sébastien Marchand

unread,
Aug 6, 2015, 10:15:11 AM8/6/15
to hend...@chromium.org, Chromium-dev
Same thing for me. Are you using the version of Git that comes with depot_tools ? 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Sébastien Marchand | Software Developer | sebma...@google.com 


Ryan Tseng

unread,
Aug 6, 2015, 11:25:22 AM8/6/15
to sebma...@chromium.org, hend...@chromium.org, Chromium-dev
The version of git in depot_tools was modified to fix a bug.  The cause (for our bug) was due to every time bash.exe was called, it would try to do a network call for list of domain servers, and time out.
Our fix was to ship our own msys.dll for the git in depot_tools

Details here:

I don't know if its the same bug you're describing, but you can check by getting a stack trace of a running/stuck sh.exe

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Bruce

unread,
Aug 6, 2015, 5:04:08 PM8/6/15
to Chromium-dev, sebma...@chromium.org, hend...@chromium.org, hin...@chromium.org
I turned off auto gc (with git config --global gc.auto 0) to avoid hitting crbug.com/350413. I hit it a few months ago and it was annoying and confusing.

Gabriel Charette

unread,
Aug 14, 2015, 4:20:06 PM8/14/15
to bruce...@chromium.org, Chromium-dev, sebma...@chromium.org, hend...@chromium.org, hin...@chromium.org
Actually I just realized I have a custom .gitconfig in my %HOME%, looking at its history (it's Google Drive backed), neither preloadindex, nor fscache were set whereas the default one in \depot_tools\git-1.9.5.chromium.6_bin\etc\.gitconfig has those params.

That could explain why setting them helped me.

I guess there is no way to both have a custom .gitconfig and enjoy the latest tweaks to the default .gitconfig? Or is there such a thing as a hierarchy of .gitconfigs?!

@Bruce: good point, I've now removed the automatic git gc (git config --global gc.auto 0) and added a manual "git gc" step to my automated sync all/ctags/etc :-).

On Thu, Aug 6, 2015 at 5:04 PM Bruce <bruce...@chromium.org> wrote:
I turned off auto gc (with git config --global gc.auto 0) to avoid hitting crbug.com/350413. I hit it a few months ago and it was annoying and confusing.

Reply all
Reply to author
Forward
0 new messages