The best option is to use APC or Zend_Accelerator. But still, you can make these "compilation" scripts that combine classes together into a single file. This reduces the required IO to a minimum. Unfortunately, you also need to rewrite the startup process so that it looks at the corresponding file. You can usually combine common classes (Zend_Form + Elements + Decorators, commonly used validators, Request + Response + Router + Controller, Zend_Db + adapters + Zend_Db_Select, etc.). Basically, classes always used for each request can be easily compressed and manually included in one file. The best way is to add a debugging call that will save all the included files ( http://www.php.net/get_included_files ) in the database, and then:
SELECT * FROM files GROUP BY filename WHERE COUNT(filename) = $numOfRequests
All files as a result can be safely combined into one file and included before downloading :)
source share