httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: [PATCH] buffered reading of the cfg file
Date Wed, 14 Jun 2000 17:06:54 GMT
On Wed, 14 Jun 2000 12:46:54 -0400, Jeff Trawick wrote:

>> From: rbb@covalent.net
>> Date: Wed, 14 Jun 2000 08:47:27 -0700 (PDT)
>> 
>> > The OS/2 code works fine and is the original version. I did the Win32 code
>> > too but commited it with the comment that it was only tested to compile,
>> > not work. As this was some time ago & nobody's complained I'd assumed it
>> > works. If it doesn't let me know, it should only require minor tweaks. I
>> > think Ryan did the unix version.
>> 
>> I did do the Unix version, it it too was commited with the comment that it
>> was only tested to compile and not work.  I haven't really looked at this
>> code again.  I find it hard to believe that this code requires the major
>> overhaul that was posted, because basically the code is working on
>> OS/2.
>> 
>> Ryan
>
>Which part of the change is too much?

Err, the fact that there's so much of it? :)


>At the expense of a little speed, ap_fgets() could call ap_read()
>instead of walking through the buffer itself, but if we can justify
>ignoring '\r' on Unix I'd rather ap_fgets() look for '\n' with
>memchr() anyway so that it can jump through the buffer (as memchr()
>and memcpy() tend to turn into inline code with compiled with
>optimization).

Interesting idea, though it has it's own complications like handling when
the buffer doesn't have the whole line in it. Still, it would be useful to
benchmark both methods & see if there's significant speed gain to be had.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message