There's arguments on both sides of the fence on this one. I personally like having organization in my code, which is why I like the multi-file method and we can just use APC to speed up code execution. However, not everybody has that option, which runs into a problem. On top of that, you start relying on your cache, not your code efficiency, for speedy code which, imo, is very, very bad.
Now, as far as Zend_Loader, don't use it. It completely negates the ability to use APC. Zend_Loader allows dynamic loading of classes which just happens to prevent APC's ability to determine which files should be cached. Always use require/include for your classes, that way you can use APC and its features. Zend_Loader is convenient, but it's not worth the overhead it gives. The only situations I use Zend_Loader is during factor class creations. That's it. I like the compile() method you pointed out, Lukasz, but I'm not quite completely sold on it yet. I can see the benefits, but there are questions to ask on both sides of that, too Philip On Sun, May 11, 2008 at 8:36 AM, Karol Grecki <[EMAIL PROTECTED]> wrote: > > Did you test it with opcode cache enabled? > > It's true that lots of files are included and compiled, but that's what you > have APC for. > > Karol > > > Łukasz Bandzarewicz wrote: > > > > Hi all! > > > > During simple profiling I noticed that Zend_Loader could consume 20-25% > of > > execution time. > > It's quite obvious, because ZF has to load lots of files, but.. > > have you ever wondering about compile ZF code? Something similar to > > phpDoctrine's compile method > > ( > http://www.phpdoctrine.org/documentation/manual/0_11?one-page#improving-performance > )? > > > > The compile method makes single file of most used components. > Additionally > > it could remove comments and white spaces to reduce size of compiled > file. > > It could reduce slow disk operations (check if file exists, load file, > > etc.) and increase performance. > > > > What you think, is this feasible? > > > > > > -- > View this message in context: > http://www.nabble.com/Zend-Loader-performance-tp17170525p17170545.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > -- Philip [EMAIL PROTECTED] http://www.gpcentre.net/