It runs slowly with low CPU utilization.
When opening the ucrt64 shell, there is always a delay. Additionally, when using the cmake and make commands, the CPU utilization is only around 15%.
make does not run in parallel by default, either use ninja or make -j <number of processes>.
makedoes not run in parallel by default, either useninjaormake -j <number of processes>.
I use the parallel commend. I think it's not the key reason. When you run the commend "time gcc --version" , the real time should about 0.005s, but my PC prints "real 0.7s", it's very strenge. My cpu is i9-13980HX, it shouldn't have this problem.
@DYHrich
when you use time, you can probably see that usr and sys are both very low, it indicates heavy io. you can use strace to check what happens. I also use procmon from sysinternals to diagnose.
已收到,谢谢
@DYHrich when you use time, you can probably see that usr and sys are both very low, it indicates heavy io. you can use
straceto check what happens. I also useprocmonfrom sysinternals to diagnose.
My IO is normal. Now i have changed to use WSL. I have no idea how to solve this problem.
Thank you for your reply and advise!
WSL is going to be faster no matter what, specifically for shell scripts since fork() overhead is non-existent there
If you still need msys, try to identify what subset of a command causes issues
When opening the ucrt64 shell, there is always a delay
When opening any msys shell, it loads /etc/profile, which loads a bunch of other scripts. You can disable some behavior by simply deleting lines, but there aren't any easy fixes for speeding up msys