On Sunday 09 September 2001 12:00, Marc Slemko wrote:
> On Sun, 9 Sep 2001, Brian Pane wrote:
> > On Linux, at least, it's a win. I did some experiments a few weeks ago
> > and found that, after doing open and mmap on a file, it's faster to send
> > it with sendfile than with write.
>
> If you are going to use sendfile(), then mmap()ing the file to begin
> with is pointless and just adds overhead. It would seem that it would be
> better to delay on making a decision about if a file will be mmap()ed or
> not until there is some actual need to mmap it instead of just doing it
> anyway.
We already do that. We only mmap the file when a filter wants to read from
it. The problem now, is that we have already scanned all the data, and there
were no changes to to data. Now, do we try to use sendfile, or just use
the mmap'ed data?
Ryan
______________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
Covalent Technologies [EMAIL PROTECTED]
--------------------------------------------------------------