> 
>>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?


Mainly the bloat factor, we already have a large core, imho, functions 
shouldn't be added unless there are no workarounds.  Also, it requires a 
little too much thought, into what sizes are good for mmap() and what 
sizes are good for block read's (it also requires knowledge of mmap(), 
because many people might automatically assume that block_read would 
always be faster).  I'm pretty sure if we polled php-general and php-qa 
(the more "knowledgable" user bases), most people wouldn't really 
understand what mmap does, or what it is for or when it is beneficial to 
use it.

As for magical, well a bit, but good magic and internal magic (not 
syntactical magic).  I'd assume that most systems have a certain point 
where mmap is no longer more beneficial than reading a file by chunks. 
If we can find a reasonable number (or have a user specify that in a 
configuration option if really necessary), it saves the user the trouble 
of thinking about something which is pretty low-level and it reduces 
bloat.  I don't really see a downside to this magic.

-Sterling






-- 
PHP Development Mailing List <http://www.php.net/>
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