httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <>
Subject Re: [PATCH]: emulate_sendfile fix [WAS]: File buckets v. core_output_filter
Date Mon, 22 Mar 2004 21:42:46 GMT
On Tue, 2004-03-23 at 07:48, Bill Stoddard wrote:

> I took a 15 second look at the patch and have a concern (perhaps unfounded).  apr_file_seek()
is probably an 
> expensive operation. If offset is 0, then in almost all cases (correct me if i'm wrong)
the fileptr will be at 
> offset 0 as well, right? So your patch will result in an expensive operation which is
not needed most of the 
> time. Is there a different way to fix this?

You are correct, it is probably an expensive operation. The other way
would be to know the position within a file and compare it to the one
that we should go to. If they are the same, do nothing.

There is fgetpos() in ANSI C, but I'm not sure what the equivalent in
APR is and how expensive it is.


View raw message