delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/27/19:44:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Sun, 27 Jun 2004 19:43:50 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: higher-level IO very slow with cygwin1.dll 5.10 (due to set_flags?)
Message-ID: <20040627234350.GA13744@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <opr96vbqwilh6y6a AT localhost> <20040626154504 DOT GA961349 AT hpn5170x> <20040626160554 DOT GA980221 AT hpn5170x> <20040626170940 DOT GD20063 AT trixie DOT casa DOT cgf DOT cx> <20040626174145 DOT GA1032441 AT hpn5170x> <20040627194205 DOT GA10371 AT trixie DOT casa DOT cgf DOT cx> <20040627212949 DOT GA176017 AT Worldnet>
Mime-Version: 1.0
In-Reply-To: <20040627212949.GA176017@Worldnet>
User-Agent: Mutt/1.4.1i

On Sun, Jun 27, 2004 at 05:29:50PM -0400, Pierre A. Humblet wrote:
>On Sun, Jun 27, 2004 at 03:42:05PM -0400, Christopher Faylor wrote:
>> On Sat, Jun 26, 2004 at 01:41:45PM -0400, Pierre A. Humblet wrote:
>
>> >Digging deeper, I see there is a function getc_unlocked. Using it
>> >instead of getc improves the speed by a factor 5. 
>> >Now that I know about it, I will redefine getc to getc_unlocked when
>> >porting single threaded applications.
>> >
>> >That issue may be a factor in the legendary slowness of Cygwin.
>> 
>> FWIW, I added some code to this particular locking function to avoid
>> doing any locks if there is only one thread.  I'm generating a snapshot
>> now.  It will be interesting to see if it improves things.  I didn't
>> do any benchmarking.  I just verified that it worked the way I thought
>> it should by looking at strace output.
>
>Here it is, using a slightly modified version of Joseph's program
>http://cygwin.com/ml/cygwin/2004-06/msg00877.html
>
>Your change makes getc work almost as fast a getc_unlocked.
>This is on Win98. Yesterday's results were on WinME, where the
>differences were larger. That hard drive died this morning :(

Sorry to hear that.  I've been going through hard disk problems
myself.

Thanks for verifying that the change worked.

cgf

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