Re: mmap in php_passthru_fd in file.c ?
| From: | Andi Gutmans | Date: | Fri, 18 May 2001 07:32:18 +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-55724@lists.php.net to get a copy of this message | ||
At 09:29 AM 5/18/2001 +0200, Jani Taskinen wrote:
On Fri, 18 May 2001, Andi Gutmans wrote: At 09:19 AM 5/18/2001 +0200, Jani Taskinen wrote:There is no need for a new function IMO.I think it probably isn't really faster (at least not noticeably) because we are anyway writing to network which I think is our bottleneck. Also it is not necessarily faster on all systems (it is system independent). I agree with you and think we should just nuke it from there. There is no good reason I can think of which justifies it in that code. Agreed. Rather have a new function that uses mmap() ie. mmap_readfile() or whatever the name would be for it.And then I find the magical 'if(!issock) {' line.. :) But still I'd rather nuke mmap..HOW fast is it anyway compared to reading/writing in chunks?
I'd like to hear Sascha's reasoning for adding mmap() in the first place. Maybe he had something special in his mind? "date: 1999/09/11 18:15:39; author: sas; state: Exp; lines: +57 -19 optimize fpassthru/readfile to use mmap instead of fread which especially increases speed on large files."OK but I really don't think it's such a big deal. Especially with the slower network pipe it is hard for me to believe that it really makes a performance difference on most systems. Andi