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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация