<?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: Lessons from Gmail: Using Timers Effectively</title>
	<atom:link href="http://ajaxian.com/archives/lessons-from-gmail-using-timers-effectively/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/lessons-from-gmail-using-timers-effectively</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: loveencounterflow</title>
		<link>http://ajaxian.com/archives/lessons-from-gmail-using-timers-effectively/comment-page-1#comment-274486</link>
		<dc:creator>loveencounterflow</dc:creator>
		<pubDate>Tue, 14 Jul 2009 13:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7070#comment-274486</guid>
		<description>this is a very interesting read for anyone doing continuous updates in the browser, and i recommend reading both http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series-using.html and http://ejohn.org/blog/how-javascript-timers-work/ . 

i&#039;ve found the single most important piece of advice in this field is, &quot;when you can not be very sure that the code called by setInterval(f,dt0) will finish in clearly less than dt0 milliseconds, consider to use setTimeout(f,dt1) instead (from within f itself to keep the process running)&quot;. this will give at least dt1 milliseconds to your other browser processes to execute so a freeze becomes less likely. you may want to check elapsed time before calling setTimeout from within f so you can add more delay in case execution was swift.</description>
		<content:encoded><![CDATA[<p>this is a very interesting read for anyone doing continuous updates in the browser, and i recommend reading both <a href="http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series-using.html" rel="nofollow">http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series-using.html</a> and <a href="http://ejohn.org/blog/how-javascript-timers-work/" rel="nofollow">http://ejohn.org/blog/how-javascript-timers-work/</a> . </p>
<p>i&#8217;ve found the single most important piece of advice in this field is, &#8220;when you can not be very sure that the code called by setInterval(f,dt0) will finish in clearly less than dt0 milliseconds, consider to use setTimeout(f,dt1) instead (from within f itself to keep the process running)&#8221;. this will give at least dt1 milliseconds to your other browser processes to execute so a freeze becomes less likely. you may want to check elapsed time before calling setTimeout from within f so you can add more delay in case execution was swift.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

