It doesn't take a lot to kill an application if using internal class causes
__autoload to run for a non-existing user class.
Neither caches not optimizations can avoid that, as you can't have something
cached which doesn't exist.
In my autoloader for example, an existing user class is resolved instantly
from a hashmap lookup, i.e. my cache. I don't have ArrayObject in my cache,
so if my autoloader is asked to find ArrayObject.class.php, it'll start
crawling huge PHP libraries of code, *every single request*, only to fail in
the end and fallback to internal class.
Is this negligible performance hit? Actually (re)scanning my full library
takes few seconds of heavy disk grinding. Make your own conclusions.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php