From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: The latest winsup snapshot. 16 Sep 1998 10:15:06 -0700 Message-ID: <19980916125720.A12797.cygnus.cygwin32.developers@cygnus.com> References: <01BDE180 DOT B504DC20 AT sos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Sergey Okhapkin , "'cygwin32-developers AT cygnus DOT com'" On Wed, Sep 16, 1998 at 02:17:50PM +0400, Sergey Okhapkin wrote: >Sergey Okhapkin wrote: >> 1. Configure scripts runs much slower with a new dll! For example, >configure of bash-2.02 takes 2m15s with the old dll and 2m57s with the new >one. >> > >Disabling new read code in syscalls.cc and passing all read requests thru >read_handler instead of creating new thred fixes performance problem (2m06s >with a new dll). Configure scripts intensively uses pipes, but bash reads >pipes one byte per read request. Thanks for narrowing this down. Does this, by any chance, also rectify the problem? I left a debugging setting in _read. Index: syscalls.cc =================================================================== RCS file: /cvs/cvsfiles/devo/winsup/syscalls.cc,v retrieving revision 1.109 diff -u -p -r1.109 syscalls.cc --- syscalls.cc 1998/09/14 01:44:11 1.109 +++ syscalls.cc 1998/09/16 16:55:04 @@ -276,7 +277,7 @@ _read (int fd, void *ptr, size_t len) if (r->res < 0) set_errno (r->newerrno); else if (r->res == 0 && - ((res = WaitForMultipleObjects (1, w4 + 1, FALSE, 100)) + ((res = WaitForMultipleObjects (1, w4 + 1, FALSE, 0)) == WAIT_OBJECT_0)) { syscall_printf ("res 0, but signalled"); -- cgf AT cygnus DOT com http://www.cygnus.com/