Mattias Thorslund wrote:
Robert Cummings wrote:
Matic Meznar wrote:
Hi,
When running a PHP script from CLI, does APC optimize it before
execution, or does APC only provide the apc_*() functions when runing
in CLI mode?
If I recall correctly, none of the accelerators work in CLI mode.
There is a php.ini setting named apc.enable_cli, which would suggest
otherwise.
I tried enabling it, and it seems my CLI script is a little faster
actually. Highly unscientific but looks like about 10%.
I stand corrected. However, accelerators don't make scripts faster per
se. They merely cut out the script reading and parsing time. So, while
you may experience 10% gain within the first second of your script
running, the use of an accelerator should have no bearing down the road
except for the initial dynamic load of other scripts at runtime. Long
running scripts will see almost no benefit from an accelerator. This is
the general reason why CLI acceleration isn't very useful. That said
though, one could certainly glean an advantage if they had a cron job or
other daemon that was loading a script often.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php