<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 20:11:28 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Patrick Allaert: Composer: speeding up class autoloading]]></title>
      <guid>http://www.phpdeveloper.org/news/19099</guid>
      <link>http://www.phpdeveloper.org/news/19099</link>
      <description><![CDATA[<p>
In <a href="http://patrickallaert.blogspot.com/2013/01/speeding-up-class-autoloading-with.html">this new post</a> <i>Patrick Allaert</i> offers a solution that can help speed up the inclusion of files via the <a href="http://getcomposer.org">Composer</a> autoloader (in addition to the already present "optimize-autoloader" option).
</p>
<blockquote>
The problem with the classmap strategy and the nature of PHP is that there is no (easy) way to have a persistent variable across requests containing the classmap. [...] This [large returned array of mappings] can even take a big portion of your request's response time when you have hundreds or thousands of classes like it is the case with <a href="http://share.ez.no/">eZ Publish 5</a> being based on <a href="http://symfony.com/">Symfony</a>, where about 2 600 classes are involved.
</blockquote>
<p>
He suggests something that could be included into the Composer functionality itself - creating symbolic links in the PSR-0 standard to the location of the files to make it easier for Composer to resolve their location (based on namespace, not having to find them). Some sample code is included showing an additional autoloader that then uses the vendor names to match the path directly.
</p>]]></description>
      <pubDate>Mon, 28 Jan 2013 12:22:43 -0600</pubDate>
    </item>
  </channel>
</rss>
