<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Propel and PHP Garbage collector</title>
	<atom:link href="http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/</link>
	<description>Fabians random thoughts about work and private life</description>
	<lastBuildDate>Sat, 02 Jul 2011 11:40:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ventzy</title>
		<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/comment-page-1/#comment-27923</link>
		<dc:creator>Ventzy</dc:creator>
		<pubDate>Fri, 08 Apr 2011 15:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.hma-info.de/blog/2007/10/02/propel-and-php-garbage-collector/#comment-27923</guid>
		<description>I had this issue when saving about 10000 objects. The process stopped at 650th object with exhausted 256 mb.

At the end of the loop I added:
  $article-&gt;clearAllReferences(true);
  unset($article); //don&#039;t know is this actually needed

now I can create 10k objects without problems.

Additionally I called Propel::disableInstancePooling(); at start.

Propel 1.5 and php 5.3.</description>
		<content:encoded><![CDATA[<p>I had this issue when saving about 10000 objects. The process stopped at 650th object with exhausted 256 mb.</p>
<p>At the end of the loop I added:<br />
  $article-&gt;clearAllReferences(true);<br />
  unset($article); //don&#8217;t know is this actually needed</p>
<p>now I can create 10k objects without problems.</p>
<p>Additionally I called Propel::disableInstancePooling(); at start.</p>
<p>Propel 1.5 and php 5.3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabian</title>
		<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/comment-page-1/#comment-2211</link>
		<dc:creator>Fabian</dc:creator>
		<pubDate>Wed, 09 Jan 2008 21:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.hma-info.de/blog/2007/10/02/propel-and-php-garbage-collector/#comment-2211</guid>
		<description>Hi Bert,
actually today I have read that his feature was dropped from 5.3 postponed to 6. Do you have any references?</description>
		<content:encoded><![CDATA[<p>Hi Bert,<br />
actually today I have read that his feature was dropped from 5.3 postponed to 6. Do you have any references?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bert-Jan</title>
		<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/comment-page-1/#comment-2204</link>
		<dc:creator>Bert-Jan</dc:creator>
		<pubDate>Wed, 09 Jan 2008 08:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.hma-info.de/blog/2007/10/02/propel-and-php-garbage-collector/#comment-2204</guid>
		<description>The trouble with Propel&#039;s circular references are supposed to be solved in the upcoming PHP 5.3, which has an improved garbage collector that can detect them and clean them up, at a slight performance penalty.
Initial testing showed that scripts were a little slower but used on average 30% less memory. The performance hit was still being worked on.</description>
		<content:encoded><![CDATA[<p>The trouble with Propel&#8217;s circular references are supposed to be solved in the upcoming PHP 5.3, which has an improved garbage collector that can detect them and clean them up, at a slight performance penalty.<br />
Initial testing showed that scripts were a little slower but used on average 30% less memory. The performance hit was still being worked on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bert-Jan</title>
		<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/comment-page-1/#comment-54</link>
		<dc:creator>Bert-Jan</dc:creator>
		<pubDate>Fri, 05 Oct 2007 09:56:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.hma-info.de/blog/2007/10/02/propel-and-php-garbage-collector/#comment-54</guid>
		<description>Maybe it&#039;ll help if you don&#039;t use a new Entry object every time, but build the Criteria directly and keep re-using the same Criteria object:

while (...) {
$crit-&gt;clear();
$crit-&gt;add(EntryPeer::ID, $row[0]);
$crit-&gt;add(EntryPeer::TITLE, utf8_encode($row[1]));
$crit-&gt;add(EntryPeer::BODY, utf8_encode($row[2]));
$crit-&gt;setDbName(EntryPeer::DATABASE_NAME);
EntryPeer::doInsert($crit);
}</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;ll help if you don&#8217;t use a new Entry object every time, but build the Criteria directly and keep re-using the same Criteria object:</p>
<p>while (&#8230;) {<br />
$crit-&gt;clear();<br />
$crit-&gt;add(EntryPeer::ID, $row[0]);<br />
$crit-&gt;add(EntryPeer::TITLE, utf8_encode($row[1]));<br />
$crit-&gt;add(EntryPeer::BODY, utf8_encode($row[2]));<br />
$crit-&gt;setDbName(EntryPeer::DATABASE_NAME);<br />
EntryPeer::doInsert($crit);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Bender</title>
		<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/comment-page-1/#comment-52</link>
		<dc:creator>Benjamin Bender</dc:creator>
		<pubDate>Wed, 03 Oct 2007 20:07:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.hma-info.de/blog/2007/10/02/propel-and-php-garbage-collector/#comment-52</guid>
		<description>Afaik, you are absolutly right - its an issue with propel by design. there are circular-references which (atm) will not caught by the garbage collector of php. In propel 1.3 its even &quot;worser&quot; caused by its instancepooling -  but it can be disabled. And therefor its working quite nice for me, even with big datasets.

reference:
http://propel.phpdb.org/trac/ticket/379
http://propel.phpdb.org/trac/ticket/420

I&#039;m using Propel 1.3 now and all the trouble is gone :) Also, the change from creole to pdo is such a huge step forward...</description>
		<content:encoded><![CDATA[<p>Afaik, you are absolutly right &#8211; its an issue with propel by design. there are circular-references which (atm) will not caught by the garbage collector of php. In propel 1.3 its even &#8220;worser&#8221; caused by its instancepooling &#8211;  but it can be disabled. And therefor its working quite nice for me, even with big datasets.</p>
<p>reference:<br />
<a href="http://propel.phpdb.org/trac/ticket/379" rel="nofollow">http://propel.phpdb.org/trac/ticket/379</a><br />
<a href="http://propel.phpdb.org/trac/ticket/420" rel="nofollow">http://propel.phpdb.org/trac/ticket/420</a></p>
<p>I&#8217;m using Propel 1.3 now and all the trouble is gone <img src='http://blog.hma-info.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Also, the change from creole to pdo is such a huge step forward&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam C</title>
		<link>http://blog.hma-info.de/2007/10/02/propel-and-php-garbage-collector/comment-page-1/#comment-48</link>
		<dc:creator>Sam C</dc:creator>
		<pubDate>Tue, 02 Oct 2007 20:33:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.hma-info.de/blog/2007/10/02/propel-and-php-garbage-collector/#comment-48</guid>
		<description>Memory leaks have never really been a big priority in PHP because the processes running the scripts are usually short lived.  Mod_php pretty much throws away the interpreter every time a request is made.  If you read the paper on scaling Flickr you&#039;ll see that they originally started to write an ftp daemon in PHP and realized that it wasn&#039;t going to work due to memory leaks.</description>
		<content:encoded><![CDATA[<p>Memory leaks have never really been a big priority in PHP because the processes running the scripts are usually short lived.  Mod_php pretty much throws away the interpreter every time a request is made.  If you read the paper on scaling Flickr you&#8217;ll see that they originally started to write an ftp daemon in PHP and realized that it wasn&#8217;t going to work due to memory leaks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

