ZF-4670: Add file path cache to Zend_Loader::loadFile()

Issue Type: Performance Improvement Created: 2008-10-21T13:12:11.000+0000 Last Updated: 2008-11-13T14:10:02.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: Attachments:


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.


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.