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

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
From: "David Tazartes" <davidt81 AT earthlink DOT net>
To: <cygwin AT cygwin DOT com>
In-Reply-To: <4A9EC162.7040502@bopp.net>
Subject: RE: Simple bash script is slow to execute - appears to be time spent starting commands like ls
Date: Wed, 2 Sep 2009 15:20:08 -0400
MIME-Version: 1.0
Message-ID: <E1MivNN-0004Mh-8u@elasmtp-spurfowl.atl.sa.earthlink.net>
X-ELNK-Trace: 5bf265d7c89f1e8e1aa676d7e74259b7b3291a7d08dfec79a639162f8266f3f1f17c9af58f828d43350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

> 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.

It was a factor of 100 - see response on other thread branch.

>> 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.

Actually just running c:\cygwin\bin\true from cmd was instructive. It does
pause noticeably. Then I tried c:\cygwin\bin\time c:\cygwin\bin\true and it
gives me the following:

0.14user 0.20system 0:00.53elapsed 63%CPU (0avgtext+0avgdata
809216maxresident)k

So basically half a second to run "/bin/true".

Now I am more convinced this is a sad, sad Vista/laptop issue.

If anyone knows how to speed up Vista process start let me know... if I find
out I will also post it, since I think many unresolved performance
complaints on this forum may be caused by the same issue.



--
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