<?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: jQuery Performance Rules</title>
	<atom:link href="http://www.artzstudio.com/2009/04/jquery-performance-rules/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/</link>
	<description>Dave Artz and his discoveries in web design and development.</description>
	<lastBuildDate>Wed, 22 Jun 2011 17:51:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Punkchip &#124; Front-end developer essentials – 5 tips for efficient jQuery</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5437</link>
		<dc:creator>Punkchip &#124; Front-end developer essentials – 5 tips for efficient jQuery</dc:creator>
		<pubDate>Thu, 16 Jun 2011 13:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5437</guid>
		<description>[...] jQuery Performance Rules [...]</description>
		<content:encoded><![CDATA[<p>[...] jQuery Performance Rules [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dale</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5335</link>
		<dc:creator>dale</dc:creator>
		<pubDate>Sat, 22 Jan 2011 15:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5335</guid>
		<description>for #6, reiterating steve&#039;s point is also very important - less statements for the script to go through.  You can also decrement a for loop and cache your length argument outside the loop.  if you do decrement, and order matters on your array, just do a .reverse() on the array before running through it.  also, instead of doing string manipulation, you can also push items into an array and then .join(&#039;&#039;) them:

var top_100_list = [...], // assume this has 100 unique strings
	$mylist = $(&#039;#mylist&#039;), // jQuery selects our  element
	top_100_ul = [&#039;&#039;], // This will store our entire unordarered list
        len = top_100_list.length; // cache the length

for (; i--;) { // must have the semi colons like a normal for loop
	top_100_ul.push(&#039;&#039; + top_100_list[i] + &#039;&#039;);
}
top_100_ul.push(&#039;&#039;); // Close our unordered list
top_100_ul.join(&#039;&#039;);
$mylist.html(top_100_li);

if i recall correctly, doing a push to an array is much faster than concatenating a string for IE.  I&#039;m not sure if that is the case for IE9 though.  But i think the opposite is true when it comes to FF and Webkit - string manipulation actually is slightly faster than pushing to an array.</description>
		<content:encoded><![CDATA[<p>for #6, reiterating steve&#8217;s point is also very important &#8211; less statements for the script to go through.  You can also decrement a for loop and cache your length argument outside the loop.  if you do decrement, and order matters on your array, just do a .reverse() on the array before running through it.  also, instead of doing string manipulation, you can also push items into an array and then .join(&#8221;) them:</p>
<p>var top_100_list = [...], // assume this has 100 unique strings<br />
	$mylist = $(&#8216;#mylist&#8217;), // jQuery selects our  element<br />
	top_100_ul = [''], // This will store our entire unordarered list<br />
        len = top_100_list.length; // cache the length</p>
<p>for (; i&#8211;;) { // must have the semi colons like a normal for loop<br />
	top_100_ul.push(&#8221; + top_100_list[i] + &#8221;);<br />
}<br />
top_100_ul.push(&#8221;); // Close our unordered list<br />
top_100_ul.join(&#8221;);<br />
$mylist.html(top_100_li);</p>
<p>if i recall correctly, doing a push to an array is much faster than concatenating a string for IE.  I&#8217;m not sure if that is the case for IE9 though.  But i think the opposite is true when it comes to FF and Webkit &#8211; string manipulation actually is slightly faster than pushing to an array.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5165</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 18 Jun 2010 13:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5165</guid>
		<description>Thank you for the great tips! But I have a problem with &quot;Leverage Event Delegation&quot;. I am building a RIA and I am using Drupal with jQuery for that. I have a big table (really big ... with around 10k cells) and also big cpu performance problems on old computers (P3s and P4s ... client&#039;s computers that I can not decide change them). I am almost sure that this problems are from the binding of different events to each cell (hover, click and dblclick) and I tried your approach to this. My problem mainly is with hover. I tried to bind hover event to the parent (the table which contains the tds) but when I hover a cell it toggles only once and it does not toggle back when the mouse is leaving cell&#039;s region. I know for a fact that happens because I bind the action to the table and not to the cell so the browser will act when I hover out of the table and not the cell. What would your approach be to this problem?

Thanks,
Alex</description>
		<content:encoded><![CDATA[<p>Thank you for the great tips! But I have a problem with &#8220;Leverage Event Delegation&#8221;. I am building a RIA and I am using Drupal with jQuery for that. I have a big table (really big &#8230; with around 10k cells) and also big cpu performance problems on old computers (P3s and P4s &#8230; client&#8217;s computers that I can not decide change them). I am almost sure that this problems are from the binding of different events to each cell (hover, click and dblclick) and I tried your approach to this. My problem mainly is with hover. I tried to bind hover event to the parent (the table which contains the tds) but when I hover a cell it toggles only once and it does not toggle back when the mouse is leaving cell&#8217;s region. I know for a fact that happens because I bind the action to the table and not to the cell so the browser will act when I hover out of the table and not the cell. What would your approach be to this problem?</p>
<p>Thanks,<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olivvv</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5081</link>
		<dc:creator>olivvv</dc:creator>
		<pubDate>Mon, 12 Apr 2010 13:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5081</guid>
		<description>hi
the &quot;use sub-queries&quot; advice is not always true. See for instance example 6 and 7 here : 
http://www.jakearchibald.com/jsperformance/sizzle/</description>
		<content:encoded><![CDATA[<p>hi<br />
the &#8220;use sub-queries&#8221; advice is not always true. See for instance example 6 and 7 here :<br />
<a href="http://www.jakearchibald.com/jsperformance/sizzle/" rel="nofollow">http://www.jakearchibald.com/jsperformance/sizzle/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nei</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5072</link>
		<dc:creator>Nei</dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5072</guid>
		<description>Thanks for the great post. 
I had most of this questions, thank you so much!</description>
		<content:encoded><![CDATA[<p>Thanks for the great post.<br />
I had most of this questions, thank you so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mads Jensen</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5059</link>
		<dc:creator>Mads Jensen</dc:creator>
		<pubDate>Fri, 29 Jan 2010 19:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5059</guid>
		<description>Good learning experience on getting my jquery scripts perform even better! Good job!</description>
		<content:encoded><![CDATA[<p>Good learning experience on getting my jquery scripts perform even better! Good job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: buy r4 ds</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5055</link>
		<dc:creator>buy r4 ds</dc:creator>
		<pubDate>Sat, 23 Jan 2010 16:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5055</guid>
		<description>Nice catch Joseph – I had meant that to use a jQuery selector for that ID.  But that’s news to me on being able to pass document.getElementById(‘blah’) to the jQuery context, seems like that could be useful. Do you have any idea whether it is better performance-wise to do that rather than $(&#039;blah&#039;).find(&#039;blah&#039;)?</description>
		<content:encoded><![CDATA[<p>Nice catch Joseph – I had meant that to use a jQuery selector for that ID.  But that’s news to me on being able to pass document.getElementById(‘blah’) to the jQuery context, seems like that could be useful. Do you have any idea whether it is better performance-wise to do that rather than $(&#8216;blah&#8217;).find(&#8216;blah&#8217;)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Irish</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5050</link>
		<dc:creator>Paul Irish</dc:creator>
		<pubDate>Fri, 15 Jan 2010 15:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5050</guid>
		<description>Great rules Dave, these have helped a lot of developers.
I have some more stuff about selector optimization and some other goodies in my talk on jQuery Anti-Patterns for Performance:
http://paulirish.com/perf</description>
		<content:encoded><![CDATA[<p>Great rules Dave, these have helped a lot of developers.<br />
I have some more stuff about selector optimization and some other goodies in my talk on jQuery Anti-Patterns for Performance:<br />
<a href="http://paulirish.com/perf" rel="nofollow">http://paulirish.com/perf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ArtzStudio</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5030</link>
		<dc:creator>ArtzStudio</dc:creator>
		<pubDate>Sat, 05 Dec 2009 01:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5030</guid>
		<description>@Erik - thanks, I can&#039;t believe I did that.</description>
		<content:encoded><![CDATA[<p>@Erik &#8211; thanks, I can&#8217;t believe I did that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zsiswick</title>
		<link>http://www.artzstudio.com/2009/04/jquery-performance-rules/comment-page-2/#comment-5029</link>
		<dc:creator>zsiswick</dc:creator>
		<pubDate>Fri, 04 Dec 2009 23:03:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.artzstudio.com/?p=83#comment-5029</guid>
		<description>Thank you for the thorough article. I have had performance concerns with using jQuery on a larger production website, and I will be utilizing some of the strategies you outlined moving forward. Adding bookmark.</description>
		<content:encoded><![CDATA[<p>Thank you for the thorough article. I have had performance concerns with using jQuery on a larger production website, and I will be utilizing some of the strategies you outlined moving forward. Adding bookmark.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

