At 02:06 PM 11/26/2001 +0000, Sam Liddicott wrote:

>I think it should; turning off fast-cache was just a quick fix which I
>haven't tried in case it slows down access to all those array items; not
>being sure what fast cache is actually for.

I turned it off for now. Basically the fast-cache allows quick allocations 
of zval's. When you free a zval it isn't really freed but kept in the fast 
cache so that the next time you want to allocate it one it is returned very 
quickly without going through the memory manager. What must have happened 
to you is that the fast cache grew extremely large which led to two things:
a) The whole cache is freed at the end of the script and that's why it 
takes a long time for PHP to shut down. Note: This shouldn't really slow 
down the overall time your script spent in PHP.
b) Your script also allocated other memory blocks which were the same size 
as zval and therefore memory manager cache hits which could have been made 
weren't made because the fast cache didn't free its memory blocks.

Both situations can be solved in limiting the size of the fast cache to 
reasonable number say 64. However, it would slow down the fast cache a tiny 
bit. In real life you probably wouldn't notice the slowdown. The only thing 
we need to check if after this patch there would still be a reasonable gain 
from the fast cache.

Andi


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to