I've profiled my code and realised, that Zend_Loader::loadClass takes a lot of time (like 100ms of each request). I see the point - being run for every class it's no surprise.
We already use opcode caching, but I want more. What I want to do is to merge frequently used classes to one file and require that file in bootstrap - thus having all the classes ready for use, minimising IO operations to minimum - autoloader won't be even fired ;)
Problem: There is a lot of classes that are required practically on every request (front controller, router, dispatcher, inflectors, controller abstract, helper broker, etc). Those classes have dependencies - their interfaces or abstract classes. I thought I would be able to make an automated tool to check for those dependencies, that would allow me to insert the classes into the file in propper order. Unfortunately autoloader doesn't load them in required order, but rather "as they come" in parsed code (for Zend_Form_Element: Z_F_Element_Text, Z_F_Element_Xhtml, Z_F_Element, ...) so dumping the classname in autoloader is no-go :(
Question: Do you use / is there a tool that would help in my case? I'd be happy to implement it myself if I had any abstract idea of how to do it.