<?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: A Grails Memory Leak</title>
	<atom:link href="http://burtbeckwith.com/blog/?feed=rss2&#038;p=73" rel="self" type="application/rss+xml" />
	<link>http://burtbeckwith.com/blog/?p=73</link>
	<description>Burt Beckwith's Java Blog</description>
	<lastBuildDate>Thu, 26 Aug 2010 12:11:31 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tweets that mention An Army of Solipsists -- Topsy.com</title>
		<link>http://burtbeckwith.com/blog/?p=73&#038;cpage=1#comment-25872</link>
		<dc:creator>Tweets that mention An Army of Solipsists -- Topsy.com</dc:creator>
		<pubDate>Thu, 21 Jan 2010 01:20:14 +0000</pubDate>
		<guid isPermaLink="false">http://burtbeckwith.com/blog/?p=73#comment-25872</guid>
		<description>[...] This post was mentioned on Twitter by Ryuichi Ohtaki, ふむふむ. ふむふむ said: RT rohtaki: A Grails Memory Leak http://bit.ly/8Mbpwy なるほど。これでバッチ処理でメモリーリークするわけだ。 [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Ryuichi Ohtaki, ふむふむ. ふむふむ said: RT rohtaki: A Grails Memory Leak <a href="http://bit.ly/8Mbpwy" rel="nofollow">http://bit.ly/8Mbpwy</a> なるほど。これでバッチ処理でメモリーリークするわけだ。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Burt</title>
		<link>http://burtbeckwith.com/blog/?p=73&#038;cpage=1#comment-23419</link>
		<dc:creator>Burt</dc:creator>
		<pubDate>Fri, 06 Nov 2009 19:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://burtbeckwith.com/blog/?p=73#comment-23419</guid>
		<description>Mark -
Typically when doing batch imports in Hibernate you flush and clear the session regularly, e.g. every 25 or 100 inserts or so. I put the call to clear PROPERTY_INSTANCE_MAP in there, e.g.:

&lt;pre&gt;for (int i = 0; i &lt; count; i++) {
  new Thing(...).save()
  if (i &gt; 0 &amp;&amp; i % BATCH_SIZE == 0) {
    session.flush()
    session.clear()
    DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP.get().clear()
  }
}&lt;/pre&gt;

but you could also call it after every save() since as long as that&#039;s successful you no longer need the associated errors.</description>
		<content:encoded><![CDATA[<p>Mark -<br />
Typically when doing batch imports in Hibernate you flush and clear the session regularly, e.g. every 25 or 100 inserts or so. I put the call to clear PROPERTY_INSTANCE_MAP in there, e.g.:</p>
<pre>for (int i = 0; i < count; i++) {
  new Thing(...).save()
  if (i > 0 &#038;&#038; i % BATCH_SIZE == 0) {
    session.flush()
    session.clear()
    DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP.get().clear()
  }
}</pre>
<p>but you could also call it after every save() since as long as that&#8217;s successful you no longer need the associated errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark O'Brien</title>
		<link>http://burtbeckwith.com/blog/?p=73&#038;cpage=1#comment-23414</link>
		<dc:creator>Mark O'Brien</dc:creator>
		<pubDate>Fri, 06 Nov 2009 13:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://burtbeckwith.com/blog/?p=73#comment-23414</guid>
		<description>Hi Burt,

Where does this piece of code:
DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP.get().clear()

need to go...is it related to every domain class access?

Thanks
M</description>
		<content:encoded><![CDATA[<p>Hi Burt,</p>
<p>Where does this piece of code:<br />
DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP.get().clear()</p>
<p>need to go&#8230;is it related to every domain class access?</p>
<p>Thanks<br />
M</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Naleid &#187; Batch Import Performance with Grails and MySQL</title>
		<link>http://burtbeckwith.com/blog/?p=73&#038;cpage=1#comment-22051</link>
		<dc:creator>Ted Naleid &#187; Batch Import Performance with Grails and MySQL</dc:creator>
		<pubDate>Thu, 01 Oct 2009 05:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://burtbeckwith.com/blog/?p=73#comment-22051</guid>
		<description>[...] reading through a couple of very helpful posts by Burt Beckwith, and reading through the Hibernate chapter on batch processing, we have all [...]</description>
		<content:encoded><![CDATA[<p>[...] reading through a couple of very helpful posts by Burt Beckwith, and reading through the Hibernate chapter on batch processing, we have all [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Naleid</title>
		<link>http://burtbeckwith.com/blog/?p=73&#038;cpage=1#comment-21386</link>
		<dc:creator>Ted Naleid</dc:creator>
		<pubDate>Sat, 12 Sep 2009 20:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://burtbeckwith.com/blog/?p=73#comment-21386</guid>
		<description>Thanks Burt, this post was a big help in figuring out what was going on with some batch loading I&#039;m doing through GORM.  I wish I had found it a couple of days ago :).</description>
		<content:encoded><![CDATA[<p>Thanks Burt, this post was a big help in figuring out what was going on with some batch loading I&#8217;m doing through GORM.  I wish I had found it a couple of days ago <img src='http://burtbeckwith.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
