<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
<channel>
    <title>Jorge Cardoso's Blog - Java</title>
    <link>http://jorgecardoso.eu/blog/</link>
    <description>A Blog (mostly) about my professional activities</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    
    

<item>
    <title>java.util.logging versus System.out performance</title>
    <link>http://jorgecardoso.eu/blog/index.php?/archives/116-java.util.logging-versus-System.out-performance.html</link>
            <category>Java</category>
    
    <comments>http://jorgecardoso.eu/blog/index.php?/archives/116-java.util.logging-versus-System.out-performance.html#comments</comments>
    <wfw:comment>http://jorgecardoso.eu/blog/wfwcomment.php?cid=116</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://jorgecardoso.eu/blog/rss.php?version=2.0&amp;type=comments&amp;cid=116</wfw:commentRss>
    

    <author>nospam@example.com (Jorge Cardoso)</author>
    <content:encoded>
    &lt;p&gt;&lt;p&gt;&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lxy&amp;amp;chco=ff0000,00ff00&amp;amp;chdl=java.util.logging|System.out&amp;amp;chd=t:1,5,10|461,12951,52160|1,5,10|129,4173,17026&amp;amp;chs=600x400&amp;amp;chxt=x,y,x,y&amp;amp;chxl=0:Threads&amp;amp;chds=0,10,0,50000,0,10,0,50000&amp;amp;chxr=0,0,10|1,0,60000&amp;amp;chxl=2:|Threads|3:|Milliseconds|&quot; border=&quot;0&quot; /&gt;&lt;/p&gt;&lt;p&gt;This is the chart comparing the java.util.logging mechanism with plain simple System.out.println to log messages in a Java program.&lt;/p&gt;&lt;p&gt;In each test, N (1, 5 and 10) threads were launched. Each thread produces 100000 log messages in a loop and records the total time. The output of the program was redirected to a file (both standard output and standard error). &lt;/p&gt;&lt;p&gt;The chart shows the average time each thread took to log the 100000 messages.&lt;/p&gt;&lt;p&gt;The thing to note is that java.util.logging scales a lot worse than plain System.out.println calls. And things get worse if you&#039;re using a FileHandler on the Logger...&lt;/p&gt;&lt;p&gt;This might not be a problem in normal programs, but in my simulation case, it was since I was launching several instances on the same machine.&amp;#160; At some point, logging was a bottleneck... &lt;/p&gt;&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 10 May 2008 10:22:11 -0400</pubDate>
    <guid isPermaLink="false">http://jorgecardoso.eu/blog/index.php?/archives/116-guid.html</guid>
    
</item>

</channel>
</rss>