This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Simple bash script is slow to execute - appears to be time spent starting commands like ls


David Tazartes wrote:
> The true loop is only about 3 times slower on Cygwin than Linux. But: "true"
> is a bash built-in, so there is no forking going on. So I'd argue this
> absolutely shows there is a forking problem. ("time true" and "time echo hi"
> both give all 0's.)

Good point.  You might also try running a shorter version of the loop
(100 iterations rather than 10000) using /bin/true rather than just
true.  I expect the performance difference to be even more dramatic.

> I also noticed that running "echo hi | c:\cygwin\bin\wc -l" just from cmd
> seems to pause for a second or so. So perhaps I have just a problem starting
> processes quickly in Vista.

Your example here uses a pipe to wc.  It's remotely possible that
something could be interfering with the pipe.  I suppose another test
you could run is a comparison of starting up cmd.exe on various Windows
systems.  If starting cmd.exe on your laptop takes significantly longer
than elsewhere, it would seem that you have other issues confounding
your use of Cygwin.

-Jeremy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]