delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/21/15:02:19

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 21 Oct 2003 15:00:11 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Linda W." <cygwin AT tlinx DOT org>
cc: cygwin AT cygwin DOT com
Subject: Re: cygwin performance
In-Reply-To: <3F957E0D.2060405@tlinx.org>
Message-ID: <Pine.GSO.4.56.0310211450190.15002@slinky.cs.nyu.edu>
References: <3F957E0D DOT 2060405 AT tlinx DOT org>
Importance: Normal
MIME-Version: 1.0

On Tue, 21 Oct 2003, Linda W. wrote:

> Has anyone done any testing on performance of cygwin utils over their
> native win counterparts?  The one that bothers me the most is the
> performance of cygwin "Find" and the windows 'find'.  If I'm just
> looking for filenames (find /c/ -name \*.wav) vs. looking for *.wav in
> windows find GUI, the performance difference is very large (maybe
> 8-10x?).  Is this unavoidable because the way cygwin does emulation or
> can optimizations be performed that would benefit all programs (not just
> find).

I suspect you're not comparing apples to apples here.  Later Windows
versions run a file indexing service in the background, which makes
finding files faster.  You might get more relevant results if you tried
using "locate"  after an "updatedb".

> Even using 'perl' over combo's of cat|tr|sed|grep|more is significantly
> faster to almost make the old unix standard scripting commands near
> worthless (I've gotten more efficient at 1-line perl scripts ala (perl
> -e '....').

You can always run these things under strace to see where the time goes.
Many factors enter into these slowdowns, e.g., if your Cygwin is installed
on a network drive, spawning multiple programs is likely to be much slower
than spawning one, no matter how large.

> Perhaps it is unavoidable, but I see things like find doing 2 'opens' /
> file when it is searching for files...can't it just do a 'stat' of some
> nature?  does it need to do an open, let alone 2?

Which tool do you use see this?  FWIW, I see at least one ReadFile in the
Cygwin fstat implementation (fstat_helper in fhandler_disk_file.cc), for
reading magic numbers to determine the executable bit.

> Just wondering....
> tnx,
> -linda

As always, PTC.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

- Raw text -


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