The specific require_once calls can easily be cached, the problem comes
into play with Zend::Loadclass or any other form of _autoloading/lazy
loading, can those be cached?
I do know that apc had problems with one of my framework based projects
that uses a _autoload system, had to change to eaccelerator.
Hmm that would be a interesting test, somehow check how well the
diffrent opcode caches out there handle lazy loading/_autoload
Richard Thomas - Code Monkey
Cyberlot Technologies Group Inc.
507.398.4124 - Voice
Martel Valgoerad wrote:
Richard Thomas wrote:
As to the Zend-Exception stuff, looking throw the changeset it didn't
look like enough files had been updated yet to make a difference but
from my earlier tests there should be a good 8-10% improvement.
Refactoring exceptions won't improve anything. In controller module
we're avoiding loading like 3-4 Exception files compared to 60 file
lookups and 29 file inclusions on a hello world application:
strace php index.php 2>&1 | grep "^open" | grep "/home/martel/WWW" \
| grep -v "No such file" | wc -l
60
After whole refactoring (like omitting Reflection calls) the biggest
problem still lies in inclusions (require_once - 66% of the run time):
pprofp-php5 -v /home/martel/WWW/apd/pprof.07356.5
Real User System secs/ cumm
%Time (excl/cumm) (excl/cumm) (excl/cumm) Calls call s/call
Memory Usage Name
--------------------------------------------------------------------------------------
16.7 0.01 0.01 0.00 0.00 0.00 0.00 2 0.0000 0.0000 0
Zend_Controller_Request_Http->getBaseUrl
16.7 0.00 0.00 0.00 0.00 0.00 0.00 2 0.0000 0.0000 0
Zend_Controller_Dispatcher->setParams
66.7 0.02 0.09 0.02 0.05 0.00 0.00 29 0.0000 0.0000 0
require_once
Tested on revision 1847 with only with APD running. Without any compiler
caches.
Richard Thomas - Code Monkey