apc and cli

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We have long running daemons written in php ( cli, non-apache
contexts) with the typical pattern:

while( !$shutdown )
{
    $c = new SomeClass;

    $c->process();
}

For performance reasons, would it help if apc.enable_cli is turned on:

  apc.enable_cli  integer

    Mostly for testing and debugging. Setting this enables APC for the
CLI version of PHP. Normally you wouldn't want to create, populate and
tear down the APC cache on every CLI request, but for various test
scenarios it is handy to be able to enable APC for the CLI version of
APC easily.


I am slightly confused by the statement - 'Mostly for testing and
debugging.....' .

On each loop iteration, does php recompile the code in 'SomeClass' (
and all its dependencies ) or it is really cached ( as it has seen the
class code once ).

If there is a php internals document on such issues, do let me know.

Thanks,
Ravi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux