httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Question. fopen() in ap_pfopen() background ?
Date Tue, 12 Oct 1999 11:30:46 GMT

Okay, I hate to say this, but I will anyway.  I wrote it this way to be
lazy.  Apache has always had buffering support in it.  If it isn't
necessary, we never have to use the APR_BUFFERED flag in ap_open.  Cool.
If we decide we don't want APR_BUFFERED, I will be more than happy to take
it out.  I just didn't want to remove the possiblity of having BUFFERED
output in case Apache really wanted it.  I also didn't have the time to
figure out if Apache needed it.  The solution?  Provide the ability to
have buffered I/O, and move on.

I am more than happy to remove buffered I/O support.  If somebody will
just tell me that Apache doesn't want to support it.


> I do understand that FILE* can avoid a kernel context switch by
> buffering in libc, but is there really a big perf gain? Don't most
> modern operating systems provide plenty of builtin buffering?
> i.e. why write it ourselves when the OS will usually do fine?
> Hrm... what I'm trying to say is: can anybody characterize the actual
> different between an fd and a FILE* on a good OS?
> Cheers,
> -g
> p.s. obviously, I've never run this perf test... if there really is a
> big difference, then I'll shut up now :-)
> --
> Greg Stein,

Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message