www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <E1Miv9v-0007Hz-Jy@elasmtp-scoter.atl.sa.earthlink.net> |
References: | <786EBDA1AC46254B813E200779E7AD363AFE50 AT srv1163ex1 DOT flightsafety DOT com> <E1Miv9v-0007Hz-Jy AT elasmtp-scoter DOT atl DOT sa DOT earthlink DOT net> |
Date: | Thu, 3 Sep 2009 08:34:45 -0400 |
Message-ID: | <dd5f2deb0909030534v4dbc046epe22814476d8b1b70@mail.gmail.com> |
Subject: | Re: Simple bash script is slow to execute - appears to be time spent starting commands like ls |
From: | Lee <ler762 AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Cc: | "Thrall, Bryan" <bryan DOT thrall AT flightsafety DOT com> |
X-IsSubscribed: | yes |
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 |
On 9/2/09, David Tazartes wrote: > Bryan Thrall wrote: > > You're right about true being built-in, but we still don't know from > your examples whether the problem is from forking or from IO. Try > replacing 'true' in Jeremy's loop with '/bin/true'. Comparison between > the two should give us an idea of the forking cost, without IO getting > in the way. > > ----- > > I had to reduce to 100 iterations. > > On Linux: > > real 0m0.448s > user 0m0.244s > sys 0m0.220s > > On Cygwin: > > real 0m48.411s > user 0m15.005s > sys 0m18.520s > > So basically a factor of 100... again points to forking or Vista process > start slowness. I couldn't resist playing along at home on a Windows XP machine :) It doesn't seem to be just a Windows Vista problem: $ time for n in $(seq 1 10000); do /bin/true; done real 3m6.641s user 5m36.750s sys 1m49.580s $ time for n in $(seq 1 10000); do true; done real 0m0.453s user 0m0.421s sys 0m0.046s $ uname -a CYGWIN_NT-5.1 33LTLG 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin Lee -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |