i used a script to find all lines that matched the rough pattern require_once '/Zend[^;]; and sourounded them with /* */.
to find all the files needed (and which is more important, order them correctly to solve all dependancies) i used Inclued which helps alot in this regard. On Thursday 28 August 2008 14:17:09 Matthew Weier O'Phinney wrote: > -- Benjamin Eberlei <[EMAIL PROTECTED]> wrote > > (on Thursday, 28 August 2008, 11:06 AM +0200): > > Rasmus Lerdorf had a new talk (froscon08) on framework performance in > > general and vs using no framework at all and came up with ZF being > > roughly in the mid-field (Cake being way slower, CodeIgniter being > > faster). > > > > He also talked about some optimizing strategies regarding include path, > > and the include strategy in general, so i took some time to optimize > > within the Zend Framework and found interesting results: Stripping all > > require_once from the complete Zend Framework code, and require (without > > once) all file dependancies directly in your main script gives you a > > performance boost of about 20-40% for each request. > > This is actually something that a lot of performance experts recommend > already, and something I want to approach with 2.0. Other projects that > are doing autoloading or discussing it are also adding some logging to > see what files are loaded per request -- which allows you to generate > the list of requires to use as you state above. When you use this > strategy alongside an opcode cache, even if not all classes are > necessary for each given request, you get a pretty significant boost. > > The one place where this will not work is plugins, particularly if you > have project-specific plugins that override functionality, but which are > only used in some areas of the site. However, I think we can likely > figure out ways around this as well. > > How did you strip the require statements? Did you use a script? inclued? > or...? > > > See all the different include strategies and their numbers here: > > > > http://www.whitewashing.de/blog/articles/73 > > > > If requiring all the dependant files up front is to hard to find out, you > > could still optimize performance of the Zend Framework by fixing your > > include path (put /usr/share/php in front of the dot, rather the default > > config which work the other way round) and strip all require_once > > 'Zend/*'; code from your downloaded ZF library source code. > > > > On Tuesday 26 August 2008 19:27:27 Endijs Lisovskis wrote: > > > At first let me say THANKS for your reply! I was not expecting such a > > > long comment. I will definitely look at ZF 1.7 features and > > > optimizations. > > > > > > I can't give you any links to articles where someone is pointing out > > > that ZF is slow, except one you already gave. But each time when I talk > > > about frameworks and ZF in particular I receive negative reactions and > > > all of theme are because of doubts about ZF performance. Those comments > > > I receive in my blog where I talk about ZF and even maybe promote it > > > and in local PHP forum too. > > > OK - those who comment cant provide exact numbers in which I could see > > > difference between ZF and other frameworks. But all they need to say - > > > ZF is complicated, big and with a lot of components etc. etc. And each > > > version is becoming bigger and bigger. I would like to argue, that > > > growth in features is not affecting speed - but I can't because there > > > are no any tests out there. > > > I hope you see the problem. In short "They say it is slow, but there is > > > no way we can prove they are wrong". > > > > > > And sorry for my grammar and structure of sentences. English is not my > > > mothers tongue, so it is not very easy for me to write in correct > > > English. > > > > > > wllm wrote: > > > > Where have you heard that ZF is one of the slowest frameworks out > > > > there? While I haven't heard many claims that ZF is the most > > > > performant- that distinction is usually reserved for Code Igniter or > > > > one of the other lightweight, performance-focused frameworks- I > > > > haven't heard any claims that it is the least performant. The most > > > > transparent and sound benchmarks that I've seen are available here: > > > > http://www.avnetlabs.com/php/php-framework-comparison-benchmarks. > > > > That puts ZF at roughly 50% of the throughput of Code Igniter. That > > > > may sound like a lot at first, but as I mention in a comment there, > > > > baseline PHP can handle *15 times* the load than Code Igniter and > > > > CakePHP falls far short of both (at least in these particular tests). > > > > This article demonstrates well that accurate performance > > > > characterizations among different frameworks are *extremely* > > > > difficult to come up with in the first place, and that any framework > > > > faces tradeoffs between performance and functionality. In the end, > > > > I'm pretty comfortable with the characterization that ZF is 'twice as > > > > slow' as a framework that has been optimized from the get go for > > > > performance like Code Igniter. Those who understand the tests at hand > > > > and have real performance requirements will understand that this may > > > > easily be eclipsed by functionality requirements for any given > > > > project. > > > > That said, we are planning to focus all of the Zend team's > > > > contributions for 1.7 around performance analysis and enhancements. > > > > We don't have a test environment with which we can thoroughly > > > > benchmark all the frameworks yet, but we will have one set up soon. > > > > Once we can start getting good numbers, we will focus on the > > > > performance of the MVC components, along with other components- like > > > > Zend_Search_Lucene- which are very sensitive to algorithmic > > > > complexity and optimizations. We've already profiled the framework > > > > with a simple application and identified some optimizations. If you > > > > are interested in the performance of ZF, then keep your eyes peeled > > > > for optimization commits in the next few weeks. > > > > > > > > ,Wil > > > > > > > >> -----Original Message----- > > > >> From: Endijs Lisovskis [mailto:[EMAIL PROTECTED] > > > >> Sent: Tuesday, August 26, 2008 8:30 AM > > > >> To: fw-general@lists.zend.com > > > >> Subject: [fw-general] Speed and performance between ZF releases > > > >> > > > >> > > > >> Hi! > > > >> > > > >> I wanted to ask - are there any tests done to compare ZF releases to > > > >> see > > > >> which ones are faster and uses less resources? > > > >> > > > >> I'm asking this, because when there are discussions about frameworks > > > >> - almost everyone says that ZF is one of slowest frameworks out > > > >> there > > > > > > > > (if > > > > > > > >> compared to Symfony, Cake etc.). It would be good to know if ZF is > > > >> making > > > >> progress, or failing because of all new functions added to it. > > > >> > > > >> Thanks! > > > >> > > > >> Endijs Lisovskis > > > >> -- > > > >> View this message in context: http://www.nabble.com/Speed-and- > > > >> performance-between-ZF-releases-tp19164298p19164298.html > > > >> Sent from the Zend Framework mailing list archive at Nabble.com. > > > > -- > > Benjamin Eberlei > > http://www.beberlei.de -- Benjamin Eberlei http://www.beberlei.de