We have a very large project with almost 15.000 commits total. I run Debian 9.3
on my Windows machine using WSL. My git version is 2.17.0
.
When I run commands such as git status
, it takes at least 20 seconds to complete. Even if no changes were made.
I have tried multiple older versions of git and even tried Ubuntu, but I still experience the same result. I've tried running a bunch of commands from various posts on here and on other sites, but none of them worked.
Funny thing: When I open up cmd.exe
or Git Bash on Windows, it takes less than a second to run git status
.
What could be causing this? What can I do to fix this?
Update June 2019: WSL 2 is coming, and with it a full system call compatibility.
That should increase Git command performance considerably!
Original answer 2018:
Git is working best when executed on a host without any intermediate layer.
For instance, if your repo is on a shared folder, Git would be considerably slower.
In case of WSL, the repo is locally accessed, but through through a filesystem translation between various Linux file system operations into NT kernel operations.
That would be enough to explain degraded performance, especially on large Git repositories
Plus make sure your $PATH
does not reference folders with Windows executable that might be called instead of the Linux ones
Possible causes:
PS1
computation