My environment is as follows.
I use docker-compose to develop Web services. Running docker-compose on Windows is very slow for accessing web pages. I created a docker environment in the Ubuntu's Home folder on WSL2. Web site data (Laravel) is installed in the docker environment on WSL2 and managed by git.
How can i improve the speed of SourceTree on WSL2? Git on Windows is faster.
Long Version: Had this issue with large repository (has many files). Investigated and found root cause of SourceTree slowness. If you find git status -uall is super slow (same slowness as SourceTree then this is likely your culprit). Sourcetree always uses -uall when doing status refreshes.
WSL2 uses the 9P protocol to access Windows drives, and it is currently known to be very slow when compared to: Native NTFS (obviously) The ext4 filesystem on the virtual disk used by WSL2. And even the performance of WSL1 with Windows drives.
File performance across the Windows and Linux operating systems is faster in WSL 1 than WSL 2, so if you are using Windows applications to access Linux files, you will currently achieve faster performance with WSL 1.
Unfortunately WSL2 has an issue with filesystem performance on /mnt
.
Might be an option to checkout
your repo into container's /home
, instead of /mnt/...
, if you don't need to edit it from windows.
Running Docker from a Linux container on windows will not help.
UPD: The same issue can appear on a large project w/o mounting anything, but still accessing repo inside WSL by \\wsl$
path from Windows. The issue still open.
My solution is to use git tasks/command inside the IDE that supports WSL.
I use Visual Studio Code inside WSL 2 and use git extensions to do git tasks/commands. The performance is superb! :-D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With