Appendix F. Zend Framework Performance Guide

Table of Contents

F.1. 介绍
F.2. Class Loading
F.2.1. How can I optimize my include_path?
F.2.1.1. Use absolute paths
F.2.1.2. Reduce the number of include paths you define
F.2.1.3. Define your Zend Framework include_path as early as possible
F.2.1.4. Define the current directory last, or not at all
F.2.2. How can I eliminate unnecessary require_once statements?
F.2.2.1. Strip require_once calls with find and sed
F.2.3. How can I speed up plugin loading?
F.2.3.1. Use the PluginLoader include file cache
F.3. Zend_Db Performance
F.3.1. How can I reduce overhead introduced by Zend_Db_Table for retrieving table metadata?
F.3.1.1. Use the metadata cache
F.3.1.2. Hardcode your metadata in the table definition
F.3.2. SQL generated with Zend_Db_Select s not hitting my indexes; how can I make it better?
F.3.2.1. Write your own tuned SQL
F.4. Internationalization (i18n) and Localization (l10n)
F.4.1. Which translation adapter should I use?
F.4.1.1. Use non-XML translation adapters for greatest speed
F.4.2. How can I make translation and localization even faster?
F.4.2.1. Use translation and localization caches
F.5. View Rendering
F.5.1. How can I speed up resolution of view helpers?
F.5.1.1. Use the PluginLoader include file cache
F.5.1.2. Extend Zend_View to provide often used helper methods
F.5.2. How can I speed up view partials?
F.5.2.1. Use partial() only when really necessary
F.5.3. How can I speed up calls to the action() view helper?
F.5.3.1. Use the ActionStack when possible
F.5.3.2. Favor helpers that query the model over action()

F.1. 介绍

编写这个附录的目的,是提供一些用于提升 Zend Framework 应用的性能的具体策略。本指南按照“问和答”的方式发布,并分解成相关领域。