How can I optimize my include_path?

阅读更多
How can I optimize my include_path?

One trivial optimization you can do to increase the speed of class loading is to pay careful attention to your include_path. In particular, you should do four things: use absolute paths (or paths relative to absolute paths), reduce the number of include paths you define, have your Zend Framework include_path as early as possible, and only include the current directory path at the end of your include_path.

Lazy loading is an optimization technique designed to push the expensive operation of loading a class file until the last possible moment

However, most benefits you may reap from autoloading are negated if your library code is still performing require_once() calls

你可能感兴趣的:(Zend)