Dear list ;),

We'll be shipping an Agavi-based project to a customer quite soon, and thus
are profiling and optimizing code a lot at the moment. When calling a quite
empty Action (nothing in execute(), View just renders a template, nothing
else), there's a considerable amount of time spent on two filemtime() and
two is_readable() commands inside ConfigCache::checkConfig().
When I comment these out (AG_DEBUG is off), the overall execution time
(measured in index.php, not via ExecutionTimeFilter) drops from ~80ms to
~55ms, which is roughly a 40% increase. This is because the method is called
very often (for each config loaded), and stat functions are quite slow
anyway.
In a production environment, config files never change. And config files are
always there, compiled, where they belong. So I think there should be a
separate switch that disables the two checks (does the config file exist?
Does the config file need to be re-parsed). That would speed up things
drastically.
I'm not good at inventing names, so I'm open for suggestions, but I'd like
to propose AG_COMPILE_CONFIGS or AG_CHECK_CONFIGS (both defaulting to true).

Thoughts, anyone?
- David


_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to