Due to performance issues (benchmarked) I'm trying to use another autoloader than the default Zend_Loader_Autoloader.
I tried to different method, using :
$autoloader->removeAutoloader(array('Zend_Loader_Autoloader', 'autoload'))
->setDefaultAutoloader(array($loader, 'loadClass'));
Since the Autoloader is heavily linked to most component of Zend Framework I can't "remove it".
I did an Xdebug step by step debug and it looks like the Autoloader works like this :
1) getInstance 2) Check if the called class root is a known namespace and if an autoloader exists for its namespace 3) Put on the stack the non namespaced autoloader 4) Tried autoloader on each autoloader, until a valid in found.
However, in my case my autoloader already do this (I'm using Opl Autoloader with a classMap strategy), I allready register the namspace with their respective path.
So it looks a bit overhead for me because I'd like my autoloader be used at the very begging of the lookup bypassing all Zend checks.
Do you have any ideas on improving that? How could I efficiently use a custom (and performant) autoloader within a Zend Framework project and using Zend_Loader_Autoloader