You are here: Re: mysql_real_escape_string memory leak? « PHP Programming Language « IT news, forums, messages
Re: mysql_real_escape_string memory leak?

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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация