19
6
I'm not sure what have been changed, but my Git installation started to be extremely slow on an average-sized repository. Others use Git with the same repository on similar machines.
Various commands working with local files are slow, e.g. status
& commit
. push
is fast.
Windows 10, Git 2.11.0 64 bit, high CPU consumption.
Typical problems and solutions already ruled out:
- Antivirus
- Network drive
core.fscache
time git status
(from git-bash
aka MinGW):
real 0m29.017s
user 0m0.015s
sys 0m0.031s
Tracing performance with GIT_TRACE_PERFORMANCE=true git status
unfortunately has shown only a single atomic chunk:
performance: 32.583549907 s: git command: git status
I cannot speak to your issues in particular, but I recommend starting with
prune
. It should lighten the load on other operations you attempt. Good luck! – eebbesen – 2016-12-26T16:10:01.363git prune
&&git gc
(took really long) w/o any noticeable effect. – kirilloid – 2016-12-26T16:24:24.303hmm, try http://stackoverflow.com/a/24045966/2317829 which may be related. Also, it would be interesting to see some tracing output of the slow operations (e.g.
– eebbesen – 2016-12-26T20:57:41.090GIT_TRACE_PERFORMANCE=true git status
)I've tried all of these. tracing status gave no insights (see updated post) – kirilloid – 2016-12-27T10:50:34.470
Is it still slow with less CPU consumption? – Seth – 2016-12-27T11:37:43.727
1
compile git (https://github.com/git-for-windows/git.git) on your own with Visual Studio (https://github.com/git-for-windows/git/commit/056b41311688e9f433fe28e6b3aa6687fa36ca70) to get PDBs. Now open cmd.exe as admin and run this: wpr.exe -start CPU -start ReferenceSet -filemode && timeout -1 && wpr.exe -stop C:\HighCPUUsage.etl. now do your slow git actions. after you did this, go back to CMD and press a key to stop logging. Zip the large ETL + your own generated PDbs for git and share the zip (onedrive share link)
– magicandre1981 – 2016-12-27T12:15:04.0371Unfortunately at some point git become fast again and support engineers are unable to tell me what has been changed in the repo. – kirilloid – 2017-04-07T10:14:09.823
1
I can no longer add an answer to this question, but I had the same issue, fixed it, and I want to document it for whoever lands on this page again. Simply upgrading to Git 2.15 from 2.14 (not even opening a new terminal) gave me a 3x
– alejandro5042 – 2017-12-29T23:18:21.180git status
speedup. I believe it's this: https://github.com/git-for-windows/git/pull/1344https://stackoverflow.com/questions/4485059/git-bash-is-extremely-slow-in-windows-7-x64/24045966#24045966 – Raghu Ranganathan – 2018-04-14T05:01:37.383
@RaghuRanganathan first two options were enabled by default in my version of git, the third one won't work—I tried to run
git gc
manually several times with no visible improvements. – kirilloid – 2018-04-15T18:21:44.0101I had this problem because my home folder (containing the
.gitconfig
) was on a network share. I fixed it by installing MSYS, and then installing git into MSYS withpacman -S git
. This works because MSYS has a separate home folder. – jpaugh – 2018-05-02T13:29:01.977I'm voting to close this question as off-topic because it's no longer reproducible as per OP comment.
– kenorb – 2018-05-02T14:03:44.880