Re: mmap in php_passthru_fd in file.c ?

From: Date: Thu, 17 May 2001 17:26:58 +0000
Subject: Re: mmap in php_passthru_fd in file.c ?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-55705@lists.php.net to get a copy of this message
fread() should handle this, no?
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.) Perhaps automatic detection could be option? if (filesize > X) blockread else mmap? It seems like the most intuitive way to implement it... I also wrestled with a configure option use_mmap (which might be good in general), however, that really doesn't solve the problem at hand. -Sterling

« previous php.dev (#55705) next »