<?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: When System.currentTimeMillis() is too slow&#8230;</title>
	<atom:link href="http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/feed/" rel="self" type="application/rss+xml" />
	<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/</link>
	<description>no buzzwords allowed</description>
	<lastBuildDate>Wed, 10 Mar 2010 17:47:15 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Le Touilleur Express &#187; JavaRebel: interview de Toomas Römer</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-2/#comment-11941</link>
		<dc:creator>Le Touilleur Express &#187; JavaRebel: interview de Toomas Römer</dc:creator>
		<pubDate>Thu, 14 May 2009 20:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-11941</guid>
		<description>[...] de ZeroTurnaround - Le blog de Toomas et de Jevgeni - Jevgeni sur Twitter - Toomas sur Twitter - Exemple d&#8217;article de Jevgeni sur la lenteur de System.currentTime&#8230;        RSS   Class&#233; dans: Java   Tags: [...]</description>
		<content:encoded><![CDATA[<p>[...] de ZeroTurnaround &#8211; Le blog de Toomas et de Jevgeni &#8211; Jevgeni sur Twitter &#8211; Toomas sur Twitter &#8211; Exemple d&#8217;article de Jevgeni sur la lenteur de System.currentTime&#8230;        RSS   Class&eacute; dans: Java   Tags: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik Stahl</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-2/#comment-2844</link>
		<dc:creator>Henrik Stahl</dc:creator>
		<pubDate>Wed, 29 Oct 2008 09:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2844</guid>
		<description>&gt;What did I say differently. “We didn’t want”
&gt; == “refused”.

We did not forbid you from using the data, nor is there anything in our license etc that would stop that. We only recommended against it and warned that it was unsupported and experimental (see my email to you dated Dec 4 2007 for reeferance). Your choice of words here seems to imply something else, but if that&#039;s not the case then we are in agreement.

&gt;Come on it does not take a genius to figure
&gt;out a way to expose counters in a generic
&gt;fashion and still allow you to add and remove 
&gt;across releases even fix ones that did not 
&gt;work. We do this ourselves today with all our 
&gt;counters and meters being dynamic and optional.

I&#039;m glad to hear that you have find a simple and cheap way of doing this in your product. But even if the cost is low it still has to be prioritized against other features and it has not yet popped up to the top of that list for us.

Henrik</description>
		<content:encoded><![CDATA[<p>&gt;What did I say differently. “We didn’t want”<br />
&gt; == “refused”.</p>
<p>We did not forbid you from using the data, nor is there anything in our license etc that would stop that. We only recommended against it and warned that it was unsupported and experimental (see my email to you dated Dec 4 2007 for reeferance). Your choice of words here seems to imply something else, but if that&#8217;s not the case then we are in agreement.</p>
<p>&gt;Come on it does not take a genius to figure<br />
&gt;out a way to expose counters in a generic<br />
&gt;fashion and still allow you to add and remove<br />
&gt;across releases even fix ones that did not<br />
&gt;work. We do this ourselves today with all our<br />
&gt;counters and meters being dynamic and optional.</p>
<p>I&#8217;m glad to hear that you have find a simple and cheap way of doing this in your product. But even if the cost is low it still has to be prioritized against other features and it has not yet popped up to the top of that list for us.</p>
<p>Henrik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gillbert</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-2/#comment-2837</link>
		<dc:creator>gillbert</dc:creator>
		<pubDate>Wed, 29 Oct 2008 00:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2837</guid>
		<description>Before doing any optimization you should do a benchmark first, so at the end you will know the performance is actually improved</description>
		<content:encoded><![CDATA[<p>Before doing any optimization you should do a benchmark first, so at the end you will know the performance is actually improved</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Louth</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-2/#comment-2824</link>
		<dc:creator>William Louth</dc:creator>
		<pubDate>Tue, 28 Oct 2008 09:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2824</guid>
		<description>&quot;Will - this is not an entirely correct statement as you well know. We didn’t want to expose the proprietary counters since the current API was experimental and many of the counters were untested (and didn’t work!). We didn’t want 3rd parties relying on them since that would put us in a situation where we couldn’t change our API without breaking your tools. I told you as much at the time.&quot;

What did I say differently. &quot;We didn&#039;t want&quot; == &quot;refused&quot;. 

Come on it does not take a genius to figure out a way to expose counters in a generic fashion and still allow you to add and remove across releases even fix ones that did not work. We do this ourselves today with all our counters and meters being dynamic and optional.

I asked for this a few times for this well before you even joined the BEA JRockit team when the team were looking for a tools architect in 2003.

William</description>
		<content:encoded><![CDATA[<p>&#8220;Will &#8211; this is not an entirely correct statement as you well know. We didn’t want to expose the proprietary counters since the current API was experimental and many of the counters were untested (and didn’t work!). We didn’t want 3rd parties relying on them since that would put us in a situation where we couldn’t change our API without breaking your tools. I told you as much at the time.&#8221;</p>
<p>What did I say differently. &#8220;We didn&#8217;t want&#8221; == &#8220;refused&#8221;. </p>
<p>Come on it does not take a genius to figure out a way to expose counters in a generic fashion and still allow you to add and remove across releases even fix ones that did not work. We do this ourselves today with all our counters and meters being dynamic and optional.</p>
<p>I asked for this a few times for this well before you even joined the BEA JRockit team when the team were looking for a tools architect in 2003.</p>
<p>William</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik Stahl</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-1/#comment-2823</link>
		<dc:creator>Henrik Stahl</dc:creator>
		<pubDate>Tue, 28 Oct 2008 09:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2823</guid>
		<description>&gt;I pushed this with the BEA JRockit years ago
&gt;and Henrik and team refused to make this and
&gt;other counters available even though I was
&gt;able to see some of these counters.

Will - this is not an entirely correct statement as you well know. We didn&#039;t want to expose the proprietary counters since the current API was experimental and many of the counters were untested (and didn&#039;t work!). We didn&#039;t want 3rd parties relying on them since that would put us in a situation where we couldn&#039;t change our API without breaking your tools. I told you as much at the time.

Jevgeni - You may want to use nanotime when timing instead of currenttimemillis. It is very cheap on Windows at least.

For really low-level profiling, you may want to look at platform dependent tools like Intel VTune or AMD&#039;s CodeAnalyst. Many of them have Java support.

And if you happen to be an Oracle customer, you can look at JRockit Mission Control. Doesn&#039;t have wall-clock method profiling, but a lot of other goodies and it piggybacks on the JVM hotspot detector etc so no overhead from profiling.

Cheers -- Henrik, JRockit team</description>
		<content:encoded><![CDATA[<p>&gt;I pushed this with the BEA JRockit years ago<br />
&gt;and Henrik and team refused to make this and<br />
&gt;other counters available even though I was<br />
&gt;able to see some of these counters.</p>
<p>Will &#8211; this is not an entirely correct statement as you well know. We didn&#8217;t want to expose the proprietary counters since the current API was experimental and many of the counters were untested (and didn&#8217;t work!). We didn&#8217;t want 3rd parties relying on them since that would put us in a situation where we couldn&#8217;t change our API without breaking your tools. I told you as much at the time.</p>
<p>Jevgeni &#8211; You may want to use nanotime when timing instead of currenttimemillis. It is very cheap on Windows at least.</p>
<p>For really low-level profiling, you may want to look at platform dependent tools like Intel VTune or AMD&#8217;s CodeAnalyst. Many of them have Java support.</p>
<p>And if you happen to be an Oracle customer, you can look at JRockit Mission Control. Doesn&#8217;t have wall-clock method profiling, but a lot of other goodies and it piggybacks on the JVM hotspot detector etc so no overhead from profiling.</p>
<p>Cheers &#8212; Henrik, JRockit team</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Lawrey</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-1/#comment-2822</link>
		<dc:creator>Peter Lawrey</dc:creator>
		<pubDate>Tue, 28 Oct 2008 07:05:16 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2822</guid>
		<description>I am sure I am missing the point but you can do this for any number of tasks and still be performant.

int PROCESSORS = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors();
ScheduledExecutorService ses = Executors.newScheduledThreadPool(PROCESSORS);
// or
ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor();
// any number of Runnable can be added.
ses.schedule(command, 500, TimeUnit.MILLISECONDS);
ses.scheduleAtFixedRate(command, 500, 500, TimeUnit.MILLISECONDS);</description>
		<content:encoded><![CDATA[<p>I am sure I am missing the point but you can do this for any number of tasks and still be performant.</p>
<p>int PROCESSORS = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors();<br />
ScheduledExecutorService ses = Executors.newScheduledThreadPool(PROCESSORS);<br />
// or<br />
ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor();<br />
// any number of Runnable can be added.<br />
ses.schedule(command, 500, TimeUnit.MILLISECONDS);<br />
ses.scheduleAtFixedRate(command, 500, 500, TimeUnit.MILLISECONDS);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kirk</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-1/#comment-2819</link>
		<dc:creator>Kirk</dc:creator>
		<pubDate>Tue, 28 Oct 2008 04:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2819</guid>
		<description>@William

You get green symbols unless you use something like VTune or AMD&#039;s equiv. There you get Java aware profiling supported by counters implemented in the hardware.

Regards,
Kirk</description>
		<content:encoded><![CDATA[<p>@William</p>
<p>You get green symbols unless you use something like VTune or AMD&#8217;s equiv. There you get Java aware profiling supported by counters implemented in the hardware.</p>
<p>Regards,<br />
Kirk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-1/#comment-2817</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Mon, 27 Oct 2008 23:31:10 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2817</guid>
		<description>Ah, I see. Didn&#039;t get point 1 till now.</description>
		<content:encoded><![CDATA[<p>Ah, I see. Didn&#8217;t get point 1 till now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jevgeni Kabanov</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-1/#comment-2816</link>
		<dc:creator>Jevgeni Kabanov</dc:creator>
		<pubDate>Mon, 27 Oct 2008 23:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2816</guid>
		<description>@Pete

1) You for some reason assume there is one client of the ThreadThingy, there can be arbitrary many.
2) There are no advantages to using a boolean over using an int performance-wise. However with the boolean you might skip the update.</description>
		<content:encoded><![CDATA[<p>@Pete</p>
<p>1) You for some reason assume there is one client of the ThreadThingy, there can be arbitrary many.<br />
2) There are no advantages to using a boolean over using an int performance-wise. However with the boolean you might skip the update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/comment-page-1/#comment-2815</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Mon, 27 Oct 2008 23:20:57 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/?p=347#comment-2815</guid>
		<description>That is ... if it&#039;s acceptable that one test is skipped every now and never.

Doesn&#039;t pre work?</description>
		<content:encoded><![CDATA[<p>That is &#8230; if it&#8217;s acceptable that one test is skipped every now and never.</p>
<p>Doesn&#8217;t pre work?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
