httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
Subject Re: cvs commit: httpd-2.0/modules/http http_core.c
Date Wed, 24 Jan 2001 14:51:34 GMT

> On Tue, Jan 23, 2001 at 11:05:20PM -0000, wrote:
> > rbb         01/01/23 15:05:19
> >
> >   Modified:    modules/http http_core.c
> >   Log:
> >   Fix the core_output_filter.  It doesn't make any sense to send less than
> >   8K of a file using sendfile, it is easier to just read strings from the
> >   file and use those strings directly.
> Do we have any performance testing to back this up? Why would sendfile of
> less than 8k be slower than read-file/send-socket?
> I'd much rather see it remain simple and always use sendfile when a file is
> supplied.

I have to agree with Greg on this.  And the 'magic size' of 8k will vary
depending on the platform. On Windows, I don't think sendfile hurts you on
small files; it just may not help. Also, the completely breaks Windows when
the file handle is cached. The cached handle is opened for async file i/o
(necessary to share it with other threads in the process as discussed in
earlier posts) which means that you should NOT be calling apr_read on it. The
resultsof doing a non-overlapped read on a Windows file handle opened for
overlapped i/o is unpredictable.


View raw message