<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Java Tuning</title>
	
	<link>http://www.javatuning.com</link>
	<description>Software Development, Java, and some more.</description>
	<lastBuildDate>Thu, 11 Mar 2010 17:22:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CommentsForJavaTuning" /><feedburner:info uri="commentsforjavatuning" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Comment on Myth busting – String.intern() object allocations are never garbage collected by Eishay Smith</title>
		<link>http://www.javatuning.com/myth-busting-string-intern-object-allocations-are-never-garbage-collected/comment-page-1/#comment-1698</link>
		<dc:creator>Eishay Smith</dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=212#comment-1698</guid>
		<description>Thanks Eyal, this is pretty cool, didn't know about this option.</description>
		<content:encoded><![CDATA[<p>Thanks Eyal, this is pretty cool, didn&#8217;t know about this option.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Myth busting – String.intern() object allocations are never garbage collected by Eyal</title>
		<link>http://www.javatuning.com/myth-busting-string-intern-object-allocations-are-never-garbage-collected/comment-page-1/#comment-1697</link>
		<dc:creator>Eyal</dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=212#comment-1697</guid>
		<description>I think you can enable perm gen cleaning on cms

CMSPermGenSweepingEnabled</description>
		<content:encoded><![CDATA[<p>I think you can enable perm gen cleaning on cms</p>
<p>CMSPermGenSweepingEnabled</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Myth busting – String.intern() object allocations are never garbage collected by Eishay Smith</title>
		<link>http://www.javatuning.com/myth-busting-string-intern-object-allocations-are-never-garbage-collected/comment-page-1/#comment-1696</link>
		<dc:creator>Eishay Smith</dc:creator>
		<pubDate>Thu, 11 Mar 2010 15:29:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=212#comment-1696</guid>
		<description>In some cases you still want to avoid String interns. Java allocates the memory to the interned strings on the permgen space. If you have a very heavy application with tons of classes (I had some like these), the classes are competing with the interned strings on the space. While the GC does clean up the permgen space, it does it only in a "stop the world" GC and not in a CMS which you typically configure your webapp or desktop to. The problem is more typical to web application where you may have very large heaps and very high object creation rate. If the GC is being called on the permgen too often it will eventually throw out of permgen space exceptions (seen it as well).

So the final answer is "it depends" :-)
I would still recommend not to use intern in the common application though there are few edge cases where it would make sense.</description>
		<content:encoded><![CDATA[<p>In some cases you still want to avoid String interns. Java allocates the memory to the interned strings on the permgen space. If you have a very heavy application with tons of classes (I had some like these), the classes are competing with the interned strings on the space. While the GC does clean up the permgen space, it does it only in a &#8220;stop the world&#8221; GC and not in a CMS which you typically configure your webapp or desktop to. The problem is more typical to web application where you may have very large heaps and very high object creation rate. If the GC is being called on the permgen too often it will eventually throw out of permgen space exceptions (seen it as well).</p>
<p>So the final answer is &#8220;it depends&#8221; <img src='http://www.javatuning.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I would still recommend not to use intern in the common application though there are few edge cases where it would make sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Myth busting – String.intern() object allocations are never garbage collected by Gili Nachum</title>
		<link>http://www.javatuning.com/myth-busting-string-intern-object-allocations-are-never-garbage-collected/comment-page-1/#comment-1695</link>
		<dc:creator>Gili Nachum</dc:creator>
		<pubDate>Mon, 08 Mar 2010 16:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=212#comment-1695</guid>
		<description>Eyal, you seem to be right!

I've checked on both IBM Java5 and IBM Java6. 
Both loop and multi-lines concatenations turn into a StringBuilder.
Seems like there are less and less reasons to micro tune your code.
Thanks.

------------------------------------------------
concatenating in a loop - Javap will show you StringBuilder
------------------------------------------------
public static volatile String s = "";
	public static void main(String[] args) throws InterruptedException {
		for (int i=0; i&lt;10; i++) {
			String strOfThisCycle = String.valueOf(i);
			s += strOfThisCycle;
			}
	}

------------------------------------------------
Concatenating over multiple lines - Javap will show you StringBuilder
------------------------------------------------
public static void main(String[] args) throws InterruptedException {
			String strOfThisCycle = "0";
			s += strOfThisCycle;
			strOfThisCycle = String.valueOf(System.currentTimeMillis());
			s += strOfThisCycle;
	}</description>
		<content:encoded><![CDATA[<p>Eyal, you seem to be right!</p>
<p>I&#8217;ve checked on both IBM Java5 and IBM Java6.<br />
Both loop and multi-lines concatenations turn into a StringBuilder.<br />
Seems like there are less and less reasons to micro tune your code.<br />
Thanks.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
concatenating in a loop &#8211; Javap will show you StringBuilder<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
public static volatile String s = &#8220;&#8221;;<br />
	public static void main(String[] args) throws InterruptedException {<br />
		for (int i=0; i&lt;10; i++) {<br />
			String strOfThisCycle = String.valueOf(i);<br />
			s += strOfThisCycle;<br />
			}<br />
	}</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Concatenating over multiple lines &#8211; Javap will show you StringBuilder<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
public static void main(String[] args) throws InterruptedException {<br />
			String strOfThisCycle = &#8220;0&#8243;;<br />
			s += strOfThisCycle;<br />
			strOfThisCycle = String.valueOf(System.currentTimeMillis());<br />
			s += strOfThisCycle;<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Myth busting – String.intern() object allocations are never garbage collected by Eyal</title>
		<link>http://www.javatuning.com/myth-busting-string-intern-object-allocations-are-never-garbage-collected/comment-page-1/#comment-1694</link>
		<dc:creator>Eyal</dc:creator>
		<pubDate>Mon, 08 Mar 2010 13:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=212#comment-1694</guid>
		<description>Hi,

In java 6 I think that if you run javap on the for loop example you will
see that it uses StringBuilder also, But I might be mistaken :-)

Eyal</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>In java 6 I think that if you run javap on the for loop example you will<br />
see that it uses StringBuilder also, But I might be mistaken <img src='http://www.javatuning.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Eyal</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Extanding your troubleshooting facilities – Always on verbose GC by Gili Nachum</title>
		<link>http://www.javatuning.com/extanding-your-troubleshooting-facilities-always-on-verbose-gc/comment-page-1/#comment-1688</link>
		<dc:creator>Gili Nachum</dc:creator>
		<pubDate>Tue, 10 Nov 2009 18:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=138#comment-1688</guid>
		<description>Ted, I believe all log files, of all types should be roll able.

You could just have it enabled on the IBM JVM and not enabled in the Sun JVM (50% benifith with 1% work).

If on Sun the GC log is printed to the standard error, you could re-direct it (linux assumed) to Apache's rotatelogs utility.
http://httpd.apache.org/docs/2.0/programs/rotatelogs.html
Just an idea.

Good luck on that.</description>
		<content:encoded><![CDATA[<p>Ted, I believe all log files, of all types should be roll able.</p>
<p>You could just have it enabled on the IBM JVM and not enabled in the Sun JVM (50% benifith with 1% work).</p>
<p>If on Sun the GC log is printed to the standard error, you could re-direct it (linux assumed) to Apache&#8217;s rotatelogs utility.<br />
<a href="http://httpd.apache.org/docs/2.0/programs/rotatelogs.html" rel="nofollow">http://httpd.apache.org/docs/2.0/programs/rotatelogs.html</a><br />
Just an idea.</p>
<p>Good luck on that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Extanding your troubleshooting facilities – Always on verbose GC by Ted Flug</title>
		<link>http://www.javatuning.com/extanding-your-troubleshooting-facilities-always-on-verbose-gc/comment-page-1/#comment-1687</link>
		<dc:creator>Ted Flug</dc:creator>
		<pubDate>Tue, 10 Nov 2009 15:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=138#comment-1687</guid>
		<description>same results after way more than a 60 second search on google. I'm painfully aware that the jvm's have different options. I support both Sun's and IBM's jvm but was hoping to find something similar for the Sun jvm. I guess I'll have to setup a script to rotate the log, what a pain.</description>
		<content:encoded><![CDATA[<p>same results after way more than a 60 second search on google. I&#8217;m painfully aware that the jvm&#8217;s have different options. I support both Sun&#8217;s and IBM&#8217;s jvm but was hoping to find something similar for the Sun jvm. I guess I&#8217;ll have to setup a script to rotate the log, what a pain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Extanding your troubleshooting facilities – Always on verbose GC by Gili Nachum</title>
		<link>http://www.javatuning.com/extanding-your-troubleshooting-facilities-always-on-verbose-gc/comment-page-1/#comment-1686</link>
		<dc:creator>Gili Nachum</dc:creator>
		<pubDate>Sat, 07 Nov 2009 20:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=138#comment-1686</guid>
		<description>Didn't find anything in a 60 seconds search on Google.
The syntax for these things is completely different from one JVM to the other. 
It could be that there's no such thing for Sun's JVM...
No idea then. Let me know if you find anything.</description>
		<content:encoded><![CDATA[<p>Didn&#8217;t find anything in a 60 seconds search on Google.<br />
The syntax for these things is completely different from one JVM to the other.<br />
It could be that there&#8217;s no such thing for Sun&#8217;s JVM&#8230;<br />
No idea then. Let me know if you find anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Extanding your troubleshooting facilities – Always on verbose GC by Ted Flug</title>
		<link>http://www.javatuning.com/extanding-your-troubleshooting-facilities-always-on-verbose-gc/comment-page-1/#comment-1670</link>
		<dc:creator>Ted Flug</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:40:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=138#comment-1670</guid>
		<description>Nice entry on GC log rotation. Would you happen to  know if there is a similar option for Sun's JVM?</description>
		<content:encoded><![CDATA[<p>Nice entry on GC log rotation. Would you happen to  know if there is a similar option for Sun&#8217;s JVM?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why is Thread.sleep() inherently inaccurate by Gili Nachum</title>
		<link>http://www.javatuning.com/why-is-thread-sleep-inherently-inaccurate/comment-page-1/#comment-1179</link>
		<dc:creator>Gili Nachum</dc:creator>
		<pubDate>Sat, 29 Aug 2009 13:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=172#comment-1179</guid>
		<description>Right, now I know that it's not a Java thing. Windows and standard Linux systems, were just not created with this level of precision in mind.</description>
		<content:encoded><![CDATA[<p>Right, now I know that it&#8217;s not a Java thing. Windows and standard Linux systems, were just not created with this level of precision in mind.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
