|
Posted by Ivαn Sαnchez Ortega on 07/05/07 19:40
Jerry Stuckle wrote:
>> Is there a way to force garbage collection in php?
>
> Nope, no way to force garbage collection. It's not a separate thread
> like in Java; the interpreter will clean things up when it gets around
> to it.
>
> But again, I wouldn't worry about it until you have a problem. With
> 3.5M iterations, you'll have other problems than memory leaks - for
> instance, it's probably going to take a lot of time to do that many
> inserts into a database.
And it would take even more time if you forced the garbage collector to run
more frequently than needed...
Instead of that, try experimenting with prepared statements, COPY
statements and different DB interfaces; those decisions can lead to very
different times when inserting that volume of information in the DB.
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.20-1-amd64 kernel, KDE 3.5.7, and PHP
5.2.3-1+b1 generating this signature.
Uptime: 21:37:58 up 20 days, 5:08, 5 users, load average: 3.24, 3.37,
1.52
Navigation:
[Reply to this message]
|