File system performance in windows subsytem for linux is still a bit mediocre. As an example I tried running git checkout on a medium/large open source project. No download times are included in the tests.
Steps to reproduce test:
$ cd ~/
$ git clone git@github.com:umbraco/Umbraco-CMS.git
$ cd Umbraco-CMS
$ rm -rf *
$ rm .*
$ git checkout -b clean && git add . && git commit -m "clean"
$ time git checkout dev-v7
Results
All tests where run on the same host machine. This is my output from running $ time git checkout dev-v7
in the home folder on 3 different setups.
All setups had the following git config:
$ git config --global core.preloadindex true
$ git config --global core.fscache true
$ git config --global gc.auto 256
Setup 1 Ubuntu server 18.10 running under hyper-v with Linux filesystem on mounted .avhdx drive. git version 2.19.1
real 0m0.373s
user 0m0.204s
sys 0m0.168s
Setup 2 Git for windows bash git version 2.19.2.windows.1 (symlinks enabled)
real 0m3.437s
user 0m0.000s
sys 0m0.015s
Setup 3 WLinux (windows defender realtime protections: on, no folder exclusions) git version 2.19.2
real 0m41.530s
user 0m0.500s
sys 0m4.484s
Setup 4 WLinux (windows defender realtime protection: on, exclude folder %LocalAppData%\Packages\WhitewaterFoundry.Co.xxxxxxxxxxxxxxxxxxxxxx) git version 2.19.2
real 0m7.413s
user 0m0.438s
sys 0m3.063s
Setup 5 WLinux (windows defender realtime protection: off, exclude folder %LocalAppData%\Packages\WhitewaterFoundry.Co.xxxxxxxxxxxxxxxxxxxxxx) git version 2.19.2
real 0m3.521s
user 0m0.281s
sys 0m3.156s