Just tests a very simple command like:
while true; do bash -c "echo hello"; done
You will find how much slow the bash in Cygwin is. Does anybody know why?
It's a fresh install of cygwin 1.7 on win7.
thanks to Jared's testing idea, I modified the command to this(adds bash -c):
time for i in {1..10} ; do bash -c "echo Hello" ; done
Hello
...
real 0m7.711s //it's the problem
user 0m0.091s
sys 0m0.476s
fork
at all. Cygwin fudges it, but can't do it anywhere near as efficiently as a real *nix can. Each process is starting from scratch, and has to load and init the cygwin DLL, libc, etc that a fork-and-go system already has loaded.bash -c ...
doesn't invoke any startup scripts.)strace -o bash.strace bash -c "echo hello"
might tell you something useful.> time ls -la ~/c/cygwin64/bin
gave me an unimaginable 3m46.373s!! It was always slow, but recently our IT dept. changed the Windows login domain and usernames, and since then all hell broke lose...