Re: Performance problem with php
| From: | Rasmus Lerdorf | Date: | Wed, 23 Jun 2010 18:44:46 +0000 |
| Subject: | Re: Performance problem with php | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48956@lists.php.net to get a copy of this message | ||
On 6/23/10 11:40 AM, Stas Malyshev wrote:
> Hi!
>
>> Another option may be to compute a hash of the file. When you find
>> that file content has the same hash value as a known file you flag
>> them as "same file". This could be faster (file contents are cached
>
> First, two files with the same content is not the same as same file
> referred twice with different name. Second, to know that I'd need to
> open and read the whole file and then compute the hash of it - which
> sounds quite expensive. Right now with proper caching non-including
> include_once can be done with 0 system calls (unfortunately, pure PHP
> doesn't do it yet, though IIRC Zend's Optimizer+ does - not sure about
> APC).
APC does the same if you set apc.stat=0 to not check for file modifications.
-Rasmus