-- sebastian keßler <[email protected]> wrote (on Wednesday, 31 August 2011, 06:26 AM -0700): > The (zf2) classmap autoloader is everywhere considered as super fast > autoloader. (40 - 80% perfomance win) > > In our zf1 project we are currently benchmarking the codebase, inclusive the > zend bottlenecks. > > So i imported the zf1 backport of the new classmap autoloader on github to > see the difference to the standard zf1 autoloader. > > In addition i stripped out the required_once in the zf codebase, which is > also a recommendation of zend. > > The page i benchmarked loaded ca. 250 classes. > > I´m using xdebug profiler and apache benchmark to test performance. > > In fact i can´t see any performance win at all (load time, requests/second), > so i´m not quite sure wether it´s a configuration issue (wrong usage) or a > benchmarking issue.
Did you use an opcode cache? Without it, it's typically not a ton faster -- it can be ~15% faster, but if the number of classes you're loading is not terribly high, that's 20% of an already small number. With an opcode cache, the differences are greater -- ~25% improvement. However, again, if you're loading a small number of classes, that's ~25% of an already small number. The single best improvement I've seen is swapping out the PluginLoader of ZF1 with a solution that simply aliases plugins to their classes, combined with a class map autoloader. That's where you'll see the 40-80% performance gains -- because you'll get rid of any unnecessary stat calls, and under an opcode cache, potentially eliminate them entirely. > The classmap thing brings some deployment issues, so i want to be sure > about the benefit. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
