ITEEDU

附录 C. Zend Framework Performance Guide

目录

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

C.1. Introduction

The purpose of this appendix is to provide some concrete strategies for improving the performance of your Zend Framework applications. The guide is presented in a "Question and Answer" format, and broken into areas of concern.