The issue: Compiling PHP code takes a lot of time
- Your PHP code is recompiled on every request
- Even if it takes only 0.5 sec per request, this are more than 2 minutes for 250 requests
- Compiling a script takes sometimes longer than executing it
The solution: OP code caches
- Zend engine compiles PHP code into OP codes before executing it
- The generated OP codes do not change until you change the script
- An OP code cache saves you from the compile step
Recommendation: OP code caches
- APC (open source) http://pecl.php.net/APC
- Zend performance suite (commercial) http://zend.com
- mmCache (deprecated) http://turck-mmcache.sourceforge.net/