Edit report at https://bugs.php.net/bug.php?id=59951&edit=1

 ID:                 59951
 Comment by:         noda dot yoshikazu at gmail dot com
 Reported by:        gwillem at gmail dot com
 Summary:            APC & unnecessary stat() calls with dynamic
                     include()
 Status:             Open
 Type:               Bug
 Package:            APC
 Operating System:   linux
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

A note for the apc-stat-patch:

It is for APC-3.1.9. Not tested with older versions.

Yoshi


Previous Comments:
------------------------------------------------------------------------
[2011-09-14 09:36:13] gwillem at gmail dot com

Description:
------------
APC uses a stat64() call if the argument to include() is a 
variable.

It doesn't, if the argument is a string. 

In both cases the opcode cache works fine. 

In applications with many include()s and slow storage, it 
would be nice to eliminate this.

Reproduce code:
---------------
<?php
$file = "a.php";
include $file;
include "b.php";
?>


Expected result:
----------------
No stat64() calls

Actual result:
--------------
open("/home/willem/index.php", O_RDONLY|O_LARGEFILE) = 5 
fstat64(5, {st_mode=S_IFREG|0644, st_size=58, ...}) = 0 
getcwd("/", 4095) = 2 
chdir("/home/willem") = 0 
close(5)  = 0 
stat64("./a.php", {st_mode=S_IFREG|0644, st_size=2, ...}) = 0 
getcwd("/home/willem", 4096)



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=59951&edit=1

Reply via email to