delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/02/18:02:39

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
Date: Mon, 2 Sep 2002 18:02:34 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: A Simple Real World Benchmark for cygwin
Message-ID: <20020902220234.GA22844@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20020902155542 DOT GC14051 AT redhat DOT com> <CHEDKHJJDLOCCOFLMGEAOEHMCLAA DOT dvasaru AT broadpark DOT no>
Mime-Version: 1.0
In-Reply-To: <CHEDKHJJDLOCCOFLMGEAOEHMCLAA.dvasaru@broadpark.no>
User-Agent: Mutt/1.3.23.1i

On Mon, Sep 02, 2002 at 11:34:11PM +0200, Dan Vasaru wrote:
>cgf> or investigate the code and offer ways to speed it up.
>
>Here's a potential speedup for non-NTFS symlinks:
>
>The check_shortcut function in shortcut.c calls CoInitialize/CoUninitialize
>for *every* .LNK it needs to check on non EA filesystems.
>
>I ran a small test on my computer, calling check_shortcut 1000 times.
>When I moved the calls to CoInitialze/CoUnitialize outside the
>check_shortcut function, the function throughput increased from 59 calls/sec
>to 960 calls/sec.
>
>As it turns out, CoInit...CoUninit costs up to 20 msecs on my system.
>
>So my suggestion is that the CoInit../CoUnit... calls be moved to another
>spot, to be called once per thread.
>
>
>Dan.
>
>PS. This patch made no difference what-so-ever on the timing results of the
>cygbench configure on my NTFS disks; then again, it may help FATxx/Samba/NFS
>people.

Only if there are a lot of symlinks, it seems.  Otherwise the code would never
be hit.  And indiscriminately setting it once for each thread could have some
negative ramifications when the program isn't manipulating any symlinks.

It's a good suggestion, nonetheless.

Corinna, this is your code, what do you think?  Maybe a per-thread
"initialized_yet?" global would be useful here.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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