Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-20 Thread Stanislav Malyshev
Hi! We're doing some performance work in WinCache, and we're finding that some frameworks are...uh...enthusiastically using file_exists(), is_file() and is_dir() functions on files/directories that don't exist. Every. Single. Pageload. Does the PHP stat cache include negative cache

Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-20 Thread Alexander Lisachenko
I want to mention http://php.net/manual/en/opcache.configuration.php#ini.opcache.enable-file-override option, that can cache positive checks information between subsequent requests. Thanks! 2015-03-20 9:13 GMT+03:00 Stanislav Malyshev smalys...@gmail.com: Hi! We're doing some performance

RE: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-20 Thread Eric Stenson
From: Stanislav Malyshev [mailto:smalys...@gmail.com] Does the PHP stat cache include negative cache entries? If not, why not? Negative cache is tricky. Most frequent patterns look like this: 1. if(file_exists(blah)) { do stuff } 2. if(!file_exists(blah)) { throw new Exception(no

RE: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-20 Thread Eric Stenson
From: Dan Ackroyd [mailto:dan...@basereality.com] What context are these filesystem hits in, is it class autoloading by any chance? Not really. Drupal is looking for 'sites.php' in the root of the web site, and then probing lower down and finding it. It's also looking for 'settings.php'

RE: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-20 Thread Eric Stenson
From: Alexander Lisachenko [mailto:lisachenko...@gmail.com] said: I want to mention http://php.net/manual/en/opcache.configuration .php#ini.opcache.enable-file-override option, that can cache positive checks information between subsequent requests. Yes, WinCache's file cache and opcode cache

Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-19 Thread Pierre Joye
On Fri, Mar 20, 2015 at 7:26 AM, Eric Stenson erics...@microsoft.com wrote: PHP Internals folks-- We're doing some performance work in WinCache, and we're finding that some frameworks are...uh...enthusiastically using file_exists(), is_file() and is_dir() functions on files/directories that

Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-19 Thread Rasmus Lerdorf
On 03/19/2015 01:26 PM, Eric Stenson wrote: PHP Internals folks-- We're doing some performance work in WinCache, and we're finding that some frameworks are...uh...enthusiastically using file_exists(), is_file() and is_dir() functions on files/directories that don't exist. Every. Single.

Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-19 Thread Pierre Joye
On Fri, Mar 20, 2015 at 12:09 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 03/19/2015 01:26 PM, Eric Stenson wrote: PHP Internals folks-- We're doing some performance work in WinCache, and we're finding that some frameworks are...uh...enthusiastically using file_exists(), is_file() and

Re: [PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-19 Thread Dan Ackroyd
On 19 March 2015 at 20:26, Eric Stenson erics...@microsoft.com wrote: PHP Internals folks-- We're doing some performance work in WinCache, and we're finding that some frameworks are...uh...enthusiastically using file_exists(), is_file() and is_dir() functions on files/directories that

[PHP-DEV] [Q] Does PHP have a negative cache for file stat operations?

2015-03-19 Thread Eric Stenson
PHP Internals folks-- We're doing some performance work in WinCache, and we're finding that some frameworks are...uh...enthusiastically using file_exists(), is_file() and is_dir() functions on files/directories that don't exist. Every. Single. Pageload. Does the PHP stat cache include