At 10:40 PM 5/17/2001 -0700, Rasmus Lerdorf wrote:
> > > True.  But I guess my main issue is still that the behaviour changes
> > > radically based on a hidden configure check (ie. whether mmap is there
> > > or not) and that ensuring a block-by-block read in user space is
> > > inefficient for huge files.
> > >
> >
> >
> > good point...  hrrmmm....
> >
> > it seems like this is an option that should be available (somehow), yet
> > I don't really like adding another option to the function, as it
> > requires too much "smarts" on the behalf of the user (at what point does
> > mmap() slow things down instead of speed them up, what is mmap(), etc.)
>Well, we do check and only do the mmap() for files larger than the block
> > Perhaps automatic detection could be option?  if (filesize > X)
> > blockread else mmap?  It seems like the most intuitive way to implement
> > it...
>Sounds a bit magical.  Why not just a block_readfile() function?

Why is it magical? It's an internal optimization and the developer will 
never know.
I wouldn't add another file but make it a bit smarted only to mmap() small 
files and use fread() (the C version) for the rest).


PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to