ZF-4670: Add file path cache to Zend_Loader::loadFile()
Description
The biggest bottleneck of plugin loading is due to cases when the file is not found on the given paths; when it is not, an error is pushed onto the PHP error stack -- a very expensive operation that often takes up to 10 times as long as the actual include() call.
A file path cache should be added to Zend_Loader::loadFile() to allow caching the success or failure of loading so that in subsequent requests for the given path/file combination, the method may return early if the combination will not resolve.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-10-21T14:27:39.000+0000
Added to trunk with r12067
Posted by Matthew Weier O'Phinney (matthew) on 2008-10-23T12:20:33.000+0000
Original implementation led to performance degradation under normal use cases.
Posted by Matthew Weier O'Phinney (matthew) on 2008-10-23T13:53:13.000+0000
includeFileCache added to PluginLoader, netting around 64% performance gains in real-world applications.
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:02.000+0000
Changing issues in preparation for the 1.7.0 release.