-- till <[EMAIL PROTECTED]> wrote (on Friday, 07 November 2008, 03:40 PM +0100): > On Fri, Nov 7, 2008 at 1:09 PM, Matthew Weier O'Phinney > <[EMAIL PROTECTED]> wrote: > > -- Michael Depetrillo <[EMAIL PROTECTED]> wrote > > (on Thursday, 06 November 2008, 09:33 PM -0800): > >> Does using autoload improve or reduce performance? > >> > >> I thought I saw an email by you where you stated in did. > > > > It improves performance, particularly when you strip out the > > require_once calls within Zend Framework (which you can do with a simple > > one-liner using find and sed). > > Just to add to this. > > Yes, and also no. Zend_Loader by itself is faster than all the > require_once in the framework. However, it can be simplified still to > e.g. using include vs. include_once since autoload is only invoked > when the class is not found thus making include_once redundant.
The main reason Zend_Loader uses include_once over include is to ensure that if there are any arbitrary require_once or include_once calls elsewhere in the codebase, they won't lead to a conflict. While you may have stripped them from your Zend Framework install, we cannot assume you've done the same in your userland code. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
