delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/02/15:03:15

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4A9EC162.7040502@bopp.net>
Date: Wed, 02 Sep 2009 14:02:58 -0500
From: Jeremy Bopp <jeremy AT bopp DOT net>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Simple bash script is slow to execute - appears to be time spent starting commands like ls
References: <E1Miupq-0000A7-Kk AT elasmtp-kukur DOT atl DOT sa DOT earthlink DOT net>
In-Reply-To: <E1Miupq-0000A7-Kk@elasmtp-kukur.atl.sa.earthlink.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019