<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://css.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <title>Web Builder Zone - Comments for &quot;How JavaScript Timers Work&quot;</title>
 <link>http://css.dzone.com/news/how-javascript-timers-work</link>
 <description>Comments for &quot;How JavaScript Timers Work&quot;</description>
 <language>en</language>
<item>
 <title>Absolutely it would cause</title>
 <link>http://css.dzone.com/news/how-javascript-timers-work#comment-1398</link>
 <description>&lt;!--paging_filter--&gt;Absolutely it would cause issues. For example, having one tab open that has an aggressive animation running will absolutely degrade the performance of the script in other tabs. I mean, no matter which way you slice it the user doing anything else within the application is sure to degrade the performance of JavaScript (timers or not). In the background the browser will have to context switch between how the different user interface interactions are taking place, causing the timers and JavaScript to be affected.

&lt;p&gt;This is one of my favorite neat little tricks:
http://webreflection.blogspot.com/2007/09/jpu-javascript-cpu-monitor.html&lt;/p&gt;

&lt;p&gt;It monitors &quot;CPU&quot; by running an aggressive timer and seeing how long the delay is in between callbacks. The longer the delay the harder the &quot;CPU&quot; (aka the browser) is working. You could easily use this to see how much performance is affected by various tasks - all of which are sure to vary from browser to browser.&lt;/p&gt;</description>
 <pubDate>Sun, 24 Feb 2008 22:11:00 -0500</pubDate>
 <dc:creator>jeresig</dc:creator>
 <guid isPermaLink="false">comment 1398 at http://css.dzone.com</guid>
</item>
<item>
 <title>This is interesting to me</title>
 <link>http://css.dzone.com/news/how-javascript-timers-work#comment-1397</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;This is interesting to me because I&#039;m currently writing a little application for fun that relies on Javascript timers.  I have a question for you: in your article, you wrote, &amp;quot;all JavaScript in a browser executes on a single thread&amp;quot;.  Is this the same thread that the rest of the browser is running in (i.e. there&#039;s one thread for the browser, period, and everything has to run inside of it) or is there a separate thread reserved just for Javascript?&lt;/p&gt;&lt;p&gt;The reason I&#039;m asking is because while my appliction&#039;s timers are running there is very little other Javascript occurring, so problems with setInterval queuing up are not that bad in my case.  However, I&#039;m wondering if other non-Javascript events are likely to interfere with the accuracy of the timing.  For example, if the user moves the browser window or accesses browser functions (e.g. Find, Help, whatever), is this likely to pose a similar issue as when there is other Javascript code running simultaneously? &lt;/p&gt;</description>
 <pubDate>Sun, 24 Feb 2008 21:20:10 -0500</pubDate>
 <dc:creator>adriandu</dc:creator>
 <guid isPermaLink="false">comment 1397 at http://css.dzone.com</guid>
</item>
<item>
 <title>Thanks, John.</title>
 <link>http://css.dzone.com/news/how-javascript-timers-work#comment-1396</link>
 <description>&lt;!--paging_filter--&gt;Thanks, John.</description>
 <pubDate>Sun, 24 Feb 2008 20:55:43 -0500</pubDate>
 <dc:creator>mostlyharmless</dc:creator>
 <guid isPermaLink="false">comment 1396 at http://css.dzone.com</guid>
</item>
</channel>
</rss>
