The reason for this is most probably because during shutdown we decrement 
many reference counts and free each memory block separately. Theoretically 
we could just exit without doing any freeing of memory but we have to find 
a solution for freeing resources (maybe directly in the resource list and 
not via reference counting).
If you can put together a short script which demonstrates the problem 
(without using external sources such as databases) then I will try and take 
a look at it and see if we need to improve the current code or go for a 
different approach.
Also, I hope you're running in non-debug mode because debug slows down 
memory allocation/freeing significantly.

Thanks,

Andi

At 10:35 AM 11/23/2001 +0000, Sam Liddicott wrote:
>I am using PHP for a system script to import TV listings to a database.
>
>It works well but creates 20,000  to 30,000 hash elements with various
>relationships and it *seems* to take exponentially longer for the script to
>actually stop running after it reaches the "exit" statement the more items
>there are.
>
>I also note that even though max execution time is set to zero and the
>script runs for a long time, I still get a max-execution error at 30 seconds
>after the script has been trying to exit (although the script runs for many
>minutes).  30 seconds is the timeout in the php.ini which I override with
>ini_set.
>
>I think this long shutdown time is PHP's per-page cleanup freeing all the
>objects, which is not so important if running as a CGI.
>
>Currently I am quitting with
>posix_kill(posix_getpid(),5)
>as it is pretty quick
>
>but I wondered if the per-page cleanup which is only important when running
>as an apache module could be disabled in cgi mode.
>
>Sam
>
>
>
>
>--
>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]


-- 
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