Were the tests performed with & without APC? APC will load the file straight from memory in a compiled form, so should help speed things up if the original tests were performed without it. Most production environments use a cache.
Building an optimized classmap for each environment would probably only alter a small number of classes, so not sure what benefit there is in having multiple versions. For example, the difference between dev & production on one of my projects would probably be a few 10s or so classes... and some of them will be the automatic exchange of a debug class & the original class. Cameron On Saturday, November 24, 2012 5:15:44 PM UTC+13, Nicolas wrote: > > Hello, > > As i play all this afternoon with xdebug, i could see that* the class > loader* take time and mainly *is called many times (~900 by request)*. > > As i wanted* to improve the speed of a production environnement,* i made > tests and watch in details as the code is called. > > After take improvement give by the docs and finally by the command > >> php composer.phar dump-autoload --optimize > > > I* remove *from the file *vendor/composer/autoload_classmap.php* produced > *the tests classes* (252 on 2890, less than 1%) and run tests with and > without there changes. The result of the tests are in a > gist<https://gist.github.com/4137837>. > The gain is a little more than one percent on a complex page and less > significant on a hello world page. > > My personnals conclusions are the array class's map should be optimised. > Solutions could be than : > > - A *arbitrary* *environnements *should be defined* in composer* to > correspond to applications and produce specific class_loader files > purposing *to reduce the array size* > > > - The* order of calling frequencies* should impose* t*he *order in > composer requirements* which should save it in *the order of the > classes's map *file (vendor/composer/autoload_[env]_classmap.php)*, to > reduce the search time* > > I have begin to post there solutions in a composer issue created by > Seldaek few month ago. But as i maded tests on symfony, as i have a > little voice in the symfony community, and i think you could think better, > and certainly produce smarter code than me about there behaviors with > better acuity (mostly as i see the time i spend to make this mail and > so... and the hour it is). > > So good night, or have nice day, > > Best Regards, > > Nicola > > PS: Very thanks for all you works, symfony and composer and all the > library become more and more nice to use. > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en