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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to