Many components have plugins, which allow you to create your own classes to utilize with the component, as well as to override existing, standard plugins shipped with Zend Framework. This provides important flexibility to the framework, but at a price: plugin loading is a fairly expensive task.
The plugin loader allows you to register class prefix / path pairs, allowing you to specify class files in non-standard paths. Each prefix can have multiple paths associated with it. Internally, the plugin loader loops through each prefix, and then through each path attached to it, testing to see if the file exists and is readable on that path. It then loads it, and tests to see that the class it is looking for is available. As you might imagine, this can lead to many stat calls on the file system.
Multiply this by the number of components that use the PluginLoader, and you get an idea of the scope of this issue. At the time of this writing, the following components made use of the PluginLoader:
Zend_Dojo: view helpers, form elements and decorators
Zend_Filter_Inflector: filters (used by the ViewRenderer action helper and
Zend_Filter_Input: filters and validators
Zend_Form: elements, validators, filters, decorators, captcha and file transfer adapters
Zend_View: helpers, filters
How can you reduce the number of such calls made?
Zend Framework 1.7.0 adds an include file cache to the
PluginLoader. This functionality writes "
calls to a file, which you can then include in your bootstrap. While this
include_once() calls to your code, it
also ensures that the PluginLoader returns as early as possible.
The PluginLoader documentation includes a complete example of its use.