J Ravi Menon wrote:

> Few questions:
> 
> 1) Does opcode cache really matter in such cli-based daemons? As
> 'SomeClass' is instantiated at every loop, I am assuming it is only
> compiled once as it has already been 'seen'.

Yup.

> 2) What about garbage collection? In a standard apache-mod-php setup,
> we rely on the end of a request-cycle to free up resources - close
> file descriptiors, free up memory etc..
>     I am assuming in the aforesaid standalone daemon case, we would
> have to do this manually?  

Yes.

> Note: I have written pre-forker deamons in php directly and
> successfully deployed them in the past, but never looked at in depth
> to understand all the nuances. Anecdotally, I have
> done 'unset()' at some critical places were large arrays were used,
> and I think it helped. AFAIK, unlike Java, there is no 'garbage
> collector' thread that does all the magic?

Correct.



-- 
Per Jessen, Zürich (12.9°C)


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

Reply via email to