This is the mail archive of the
mailing list for the Cygwin project.
Re: stderr outputs veerrrryyy slowly
On Thu, Jun 19, 2003 at 10:11:55PM -0400, Christopher Faylor wrote:
>On Thu, Jun 19, 2003 at 10:02:15PM -0400, Larry Hall wrote:
>>Brian Dessent wrote:
>>>Larry Hall wrote:
>>>>Works for me fine either way. Perhaps providing information
>>>>requested by <http://cygwin.com/problems.html> will shed some light.
>>>>You could try it with strace and post the results too.
>>>Ok, attached should be the cygcheck -srv output. Also, the strace log
>>>for running "tidy" on a html file is at
>>><http://www.dessent.net/tmp/strace.txt> It's pretty big, about 17000
>>>lines. Of interest are two things:
>>>Running it under strace fixes the problem (!!) more or less. The output
>>>is much faster, although not quite as fast as you would expect for
>>>time strace -o strace.out tidy -o foo test.html
>>>time tidy -o foo test.html
>>OK, I have been able to reproduce this to some extent. I'm using 'curl
>>-o /dev/null http://www.google.com' which times in at about 1.5 to 2
>>seconds with 'tty' and about .5 seconds without. I don't have any
>>additional data at this point but I thought I'd "chime in" with a "me
>>too", since I know that's what this list is all about. ;-) Actually, I
>>wanted to let Brian and any others know that this doesn't appear to be
>>specific to their configuration. If I find out more, I'll report back.
>This crops up on the cygwin list from time to time.
>IIRC, if you use 'setbuf(f, NULL)' in newlib (as is the case for
>stderr), it causes newlib to flush on every character. I submitted a
>patch to fix this behavior many years ago but it was rejected. I think
>the rationale was basically a "This isn't broken. We're allowed to do
>this" but I don't really recall exactly why the patch was rejected.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html