Ответ 1
Лично я не верю, что полагаться на __autoload() - хорошая практика. PHP - это свободно типизированный язык, а не лениво типизированный язык.:)
Ознакомьтесь с некоторыми характеристиками здесь:
- http://weierophinney.net/matthew/archives/245-Autoloading-Benchmarks.html
- http://www.ilia.ws/files/zend_performance.pdf
Ответ Rasmus на это (который вы также нашли) был моим руководством во все эти годы:
<arnaud_> does autoload have a performance impact when using apc ?
<Rasmus_> it is slow both with and without apc
<Rasmus_> but yes, moreso with apc because anything that is autoloaded is pushed down into the executor
<Rasmus_> so nothing can be cached
<Rasmus_> the script itself is cached of course, but no functions or classes
<Rasmus_> Well, there is no way around that
<Rasmus_> autoload is runtime dependent
<Rasmus_> we have no idea if any autoloaded class should be loaded until the script is executed
<Rasmus_> top-level clean deps would speed things up a lot
<Rasmus_> it not just autoload
<Rasmus_> it is any sort of class or function declaration that depends on some runtime context
<Rasmus_> if(cond) function foo...
<Rasmus_> if(cond) include file
<Rasmus_> where file has functions and classes
<Rasmus_> or heaven forbid: function foo() { class bar { } }