With cache such as APC, PHP's autoloader becomes a performance point that needs to be carefully considered.
See:
Http://stackoverflow.com/questions/4788452/does-autoload-really-kill-performance-when-using-apclatest-versions-up-to-date
Http://tournasdimitrios1.wordpress.com/2013/04/15/boosting-the-performance-of-a-php-project-with-an-autoload-class-map-2/
It is said that autoloader does not conflict with APC. However, autoloader still needs to go to require_once for each request, which will lead to an additional disk Stat () operation. Can we continue optimization?
The idea is to use class_exists and regularly check whether the PHP file has been updated. This avoids the disk Stat () operation caused by a pile of require_once requests.
Most applications do not care whether PHP files are updated to the latest version after 100 milliseconds. Regular and delayed PHP file version updates should be acceptable. I do not know whether such optimization is performed within require_once.
Maybe you should let the require_once () function take a parameter directly to specify the call interval of the disk Stat. This can be simple but effective to improve performance.
I checked the APC information:
APC. Stat
APC. include_once_override
It seems that APC has noticed this problem, but the APC solution seems immature. StillExperimental.
ArticleArticleA good explanation of the relationship between APC and require_once: http://www.laruence.com/2012/09/12/2765.html