-- Keith Pope <[EMAIL PROTECTED]> wrote (on Friday, 16 May 2008, 08:23 AM +0100): > > Thx for the benchmarks :) I think there where earlier discussions on > this and the ZF team are working on their own set of benchmarks, it > will be interesting to see how all this compares.
Just for reference, Keith, Stas is a Zend employee, and is helping develop those benchmarks. Consider this a preview. :-) > Looks to me like the performance difference is pretty negligible for > most developers to worry about :) Which is precisely the point I've been trying to get across. You're more likely going to notice performance degradation from database and web service access than from Zend_Loader. > I was thinking about this after the earlier discussions and was > wondering what people thought about phar? Would this improve > performance if you really needed it? It may, it may not. I think when using the C extension (ext/phar), there is a good possibility it would increase performance, but in large part because _all_ files would be loaded on each request -- and the C extension interoperates with the opcode cache well. But packaging and deployment of phars is a whole other barrel of monkeys. > -----Original Message----- > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > Sent: 15 May 2008 23:56 > To: [email protected] > Subject: Re: [fw-general] Zend Loader performance - benchmark > > Hi! > > I've run a benchmark loading 725 framework class files on 5.2 and 5.3 with > and without bytecode caching. > The benchmark uses list of 725 Framework classes and loads them one by one, > via require_once and via Zend_Loader::loadClass. You can see the files here: > http://random-bits-of.info/fw-tests/ > > OK, so here's the results: > > Without bytecode cache: > require_once Zend_Loader > php5.2 4.42 4.42 > php5.3 4.96 4.97 > > With bytecode cache: > require_once Zend_Loader > php5.2 63.04 56.62 > php5.3 61.28 55.52 > > Numbers are requests per second (more is better). Bytecode cache used in the > benchmark is Zend's one, not APC. > > Conclusions from this would be: > 0. It is *very* important to understand that it is a narrow-point benchmark > that tests only one function in one specific way. Please do not draw > conclusions on behavior of whole applications based only on this benchmark. > > 1. You *do* want to use bytecode caching. You won't get 15x performance on > any real application, but it does speed up loading very significantly. > > 2. Without bytecode caching, it doesn't matter if you use require_once or > Loader - both are equally slow :) > > 3. With bytecode caching, Loader has some overhead - explanation for this is > that with file accesses eliminated, require_once of course has little left, > while Loader still does a couple of function calls. But on real-life apps > it'd probably be very small, provided that it's about 10% even on > loading-only huge-class-list benchmark, and your application probably does > something useful instead of loading 700+ framework classes :) > > 4. 5.3 is still a moving target, to don't put too much stake in current > benchmark results for 5.3, they probably will be different by the time > 5.3 is in release cycle (hopefully, better :) > > If you have more questions on this, please ask. > -- > Stanislav Malyshev, Zend Software Architect > [EMAIL PROTECTED] http://www.zend.com/ > (408)253-8829 MSN: [EMAIL PROTECTED] > > > > > > -- > allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone, > Hereford, HR1 3SE. > Registered in England No. 02933191. UK VAT Reg. No. 666 9148 88. > > Telephone: 0870 243 3434, Fax: 0870 243 6041. > Website: www.allpay.net > Email: [EMAIL PROTECTED] > > This email, and any files transmitted with it, is confidential and intended > solely for the use of the individual or entity to whom it is addressed. If > you have received this email in error please notify the allpay.net > Information Security Manager at the number above. > -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
