<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:dtvmedia="http://participatoryculture.org/RSSModules/dtv/1.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: Lessons in Javascript Performance Optimisation: 90 seconds down to 3 seconds</title>
	<atom:link href="http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/feed" rel="self" type="application/rss+xml" />
	<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds</link>
	<description>Mahemoff's Podcast/Blog - Web, Programming, Usability from the Author of 'Ajax Design Patterns' (AjaxPatterns.org)</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:01:13 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Zen Thoughts : Lessons in Javascript Performance Optimisation: 90 seconds down to 3 seconds</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12267</link>
		<dc:creator>Zen Thoughts : Lessons in Javascript Performance Optimisation: 90 seconds down to 3 seconds</dc:creator>
		<pubDate>Mon, 02 Oct 2006 04:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12267</guid>
		<description>&lt;p&gt;[...] More javascript performance tips, Lessons in Javascript Performance Optimisation: 90 seconds down to 3 seconds. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] More javascript performance tips, Lessons in Javascript Performance Optimisation: 90 seconds down to 3 seconds. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tech Links</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12253</link>
		<dc:creator>Tech Links</dc:creator>
		<pubDate>Sun, 01 Oct 2006 20:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12253</guid>
		<description>&lt;p&gt;[...] Javascript Optimisation - A nice article on javascript optimisation. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Javascript Optimisation &#8211; A nice article on javascript optimisation. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mahemoff</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12126</link>
		<dc:creator>mahemoff</dc:creator>
		<pubDate>Thu, 28 Sep 2006 18:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12126</guid>
		<description>&lt;p&gt;Andrew, Thanks for all the info, I&#039;m using v1.4 so won&#039;t be getting those benefits. Restricting the subset of the page is good advice too.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Andrew, Thanks for all the info, I&#8217;m using v1.4 so won&#8217;t be getting those benefits. Restricting the subset of the page is good advice too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Dupont</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12123</link>
		<dc:creator>Andrew Dupont</dc:creator>
		<pubDate>Thu, 28 Sep 2006 16:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12123</guid>
		<description>&lt;p&gt;Michael, which version of Prototype are you using?  The performance optimizations I referred to were added about two weeks ago, so you&#039;d have to be using bleeding-edge Prototype to reap the benefits.  We&#039;re on the verge of a 1.5 release, though, so if you want to stay on the stable branch you won&#039;t have long to wait.&lt;/p&gt;

&lt;p&gt;Unfortunately, if you saw only a 100% improvement going from $$ to document.getElementsByClassName, I&#039;m not sure the further optimizations would be significant enough.  In browsers that support XPath, document.getElementsByClassName is now just as fast as (if not faster than) any other DOM query, but IE is not one of those browsers. Until IE supports DOM Level 3 XPath, there won&#039;t be a no-drawbacks way to query the DOM in non-&quot;standard&quot; ways.&lt;/p&gt;

&lt;p&gt;In the meantime, you can improve the performance of getElementsByClassName &lt;em&gt;considerably&lt;/em&gt; if you restrict the query to a certain subset of the page: $(&#039;container&#039;).getElementsByClassName(&#039;foo&#039;) [or document.getElementsByClassName(&#039;foo&#039;, $(&#039;container&#039;))].  This will cut down on the number of elements that must be searched through.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Michael, which version of Prototype are you using?  The performance optimizations I referred to were added about two weeks ago, so you&#8217;d have to be using bleeding-edge Prototype to reap the benefits.  We&#8217;re on the verge of a 1.5 release, though, so if you want to stay on the stable branch you won&#8217;t have long to wait.</p>
<p>Unfortunately, if you saw only a 100% improvement going from $$ to document.getElementsByClassName, I&#8217;m not sure the further optimizations would be significant enough.  In browsers that support XPath, document.getElementsByClassName is now just as fast as (if not faster than) any other DOM query, but IE is not one of those browsers. Until IE supports DOM Level 3 XPath, there won&#8217;t be a no-drawbacks way to query the DOM in non-&#8221;standard&#8221; ways.</p>
<p>In the meantime, you can improve the performance of getElementsByClassName <em>considerably</em> if you restrict the query to a certain subset of the page: $(&#8217;container&#8217;).getElementsByClassName(&#8217;foo&#8217;) [or document.getElementsByClassName('foo', $('container'))].  This will cut down on the number of elements that must be searched through.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lessons in JavaScript Performance Optimization &#62; Archives &#62; Web 2.0 Stores</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12118</link>
		<dc:creator>Lessons in JavaScript Performance Optimization &#62; Archives &#62; Web 2.0 Stores</dc:creator>
		<pubDate>Thu, 28 Sep 2006 14:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12118</guid>
		<description>&lt;p&gt;[...]  [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mahemoff</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12090</link>
		<dc:creator>mahemoff</dc:creator>
		<pubDate>Wed, 27 Sep 2006 23:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12090</guid>
		<description>&lt;p&gt;Andrew, thanks for the suggestion. I didn&#039;t look into getElementsByClassName as I assumed Prototype or the faster add-on would be making that optimisation in the event of a single class being specified ($$(&quot;.classname&quot;)).&lt;/p&gt;

&lt;p&gt;I&#039;ve subsequently tried it, but it turns out to be not much faster on IE (perhaps a 2x speedup, whereas the server-generated JS gives something like a 20x speedup).&lt;/p&gt;

&lt;p&gt;Maybe XPath gives a better speedup on IE.&lt;/p&gt;

&lt;p&gt;I&#039;m tempted to create a benchmarking exploration tool on ajaxify - a massive dom and a JS sketchpad to benchmark queries.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Andrew, thanks for the suggestion. I didn&#8217;t look into getElementsByClassName as I assumed Prototype or the faster add-on would be making that optimisation in the event of a single class being specified ($$(&#8221;.classname&#8221;)).</p>
<p>I&#8217;ve subsequently tried it, but it turns out to be not much faster on IE (perhaps a 2x speedup, whereas the server-generated JS gives something like a 20x speedup).</p>
<p>Maybe XPath gives a better speedup on IE.</p>
<p>I&#8217;m tempted to create a benchmarking exploration tool on ajaxify &#8211; a massive dom and a JS sketchpad to benchmark queries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Dupont</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12063</link>
		<dc:creator>Andrew Dupont</dc:creator>
		<pubDate>Wed, 27 Sep 2006 16:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12063</guid>
		<description>&lt;p&gt;Michael, I commented on the Ajaxian post but thought I&#039;d also mention it here:&lt;/p&gt;

&lt;p&gt;Please look into document.getElementsByClassName.  It&#039;s &lt;em&gt;orders of magnitude faster&lt;/em&gt;, especially with the recent performance optimizations (including querying by XPath if it’s available).  $$(&quot;.foo&quot;) can be replaced with document.getElementsByClassName(&quot;foo&quot;) in every instance.  I guarantee that&#039;ll fix your problems without forcing you to give up querying by class name altogether.&lt;/p&gt;

&lt;p&gt;That said, making $$ less costly is one of the major points of focus for Prototype’s 1.5.0 release.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Michael, I commented on the Ajaxian post but thought I&#8217;d also mention it here:</p>
<p>Please look into document.getElementsByClassName.  It&#8217;s <em>orders of magnitude faster</em>, especially with the recent performance optimizations (including querying by XPath if it’s available).  $$(&#8221;.foo&#8221;) can be replaced with document.getElementsByClassName(&#8221;foo&#8221;) in every instance.  I guarantee that&#8217;ll fix your problems without forcing you to give up querying by class name altogether.</p>
<p>That said, making $$ less costly is one of the major points of focus for Prototype’s 1.5.0 release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajaxian &#187; Lessons in JavaScript Performance Optimization</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12060</link>
		<dc:creator>Ajaxian &#187; Lessons in JavaScript Performance Optimization</dc:creator>
		<pubDate>Wed, 27 Sep 2006 13:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12060</guid>
		<description>&lt;p&gt;[...] Fellow Ajaxian, Michael Mahemoff, has written about an experience with optimizing JavaScript from a 90 second benchmark to 3 seconds. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Fellow Ajaxian, Michael Mahemoff, has written about an experience with optimizing JavaScript from a 90 second benchmark to 3 seconds. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mahemoff</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12054</link>
		<dc:creator>mahemoff</dc:creator>
		<pubDate>Wed, 27 Sep 2006 08:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12054</guid>
		<description>&lt;p&gt;Marcos, Thanks for mentioning it as I did work through that blog post as well. One consequence was to unroll a function call - the same one-line function was being called 100 times,  so I got rid of that. It&#039;s a shame you still have to go to measures like this, but I don&#039;t see serious hotspot coming any ime soon.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Marcos, Thanks for mentioning it as I did work through that blog post as well. One consequence was to unroll a function call &#8211; the same one-line function was being called 100 times,  so I got rid of that. It&#8217;s a shame you still have to go to measures like this, but I don&#8217;t see serious hotspot coming any ime soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcos</title>
		<link>http://softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds/comment-page-1#comment-12052</link>
		<dc:creator>Marcos</dc:creator>
		<pubDate>Wed, 27 Sep 2006 08:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.softwareas.com/lessons-in-javascript-performance-optimisation-90-seconds-down-to-3-seconds#comment-12052</guid>
		<description>&lt;p&gt;That&#039;s nice.&lt;/p&gt;

&lt;p&gt;I don&#039;t know if you have seen the following Microsoft posts, but I have found them really useful for making JS faster (particularly in IE)!&lt;/p&gt;

&lt;p&gt;http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx&lt;/p&gt;

&lt;p&gt;Ps: Currently reading your book Ajax book, it&#039;s great! :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That&#8217;s nice.</p>
<p>I don&#8217;t know if you have seen the following Microsoft posts, but I have found them really useful for making JS faster (particularly in IE)!</p>
<p><a href="http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx" rel="nofollow">http://blogs.msdn.com/ie/archive/2006/08/28/728654.aspx</a></p>
<p>Ps: Currently reading your book Ajax book, it&#8217;s great! <img src='http://softwareas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
