<?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: Performance is in the Details</title>
	<atom:link href="http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/feed/" rel="self" type="application/rss+xml" />
	<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/</link>
	<description>Thoughts on Web Design, Development, and Applications</description>
	<lastBuildDate>Mon, 08 Mar 2010 22:52:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: diyism</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/comment-page-1/#comment-244</link>
		<dc:creator>diyism</dc:creator>
		<pubDate>Thu, 21 Aug 2008 07:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=10#comment-244</guid>
		<description>Why not use &quot;jQuery Live Bind&quot;:



$.fn.is_match=function(selector)
                      {selector=selector.split(/\s /).reverse().join(&#039; &#039;)
                                .split(&#039; &gt; &#039;).join(&#039;&quot;).parent(&quot;&#039;)
                                .split(&#039;   &#039;).join(&#039;&quot;).prev(&quot;&#039;)
                                .split(&#039; ~ &#039;).join(&#039;&quot;).prevAll(&quot;&#039;)
                                .split(/\s /).join(&#039;&quot;).parents(&quot;&#039;);
                       return eval(&#039;this.filter(&quot;&#039; selector &#039;&quot;).length&#039;);
                      }
$.live_bind=function(selector, etype, fn)
                    {$(document).bind(etype,
                                      function(event)
                                              {var event=event &#124;&#124; window.event,
                                               src_ele=event.srcElement &#124;&#124; event.target;
                                               if ($(src_ele).is_match(selector))
                                                  {fn();
                                                  }
                                              }
                                     );
                    }


hello2
hello3
hello1
hello

hello2
hello3
hello1


function alr(){alert(&#039;helloooo&#039;);}
$.live_bind(&quot;.kkkk  .ppp1   .ppp[title=&#039;333&#039;]&quot;, &#039;click&#039;, alr);
$(&#039;.kkkk&#039;).append(&#039;hello&#039;);
</description>
		<content:encoded><![CDATA[<p>Why not use &#8220;jQuery Live Bind&#8221;:</p>
<p>$.fn.is_match=function(selector)<br />
                      {selector=selector.split(/\s /).reverse().join(&#8216; &#8216;)<br />
                                .split(&#8216; &gt; &#8216;).join(&#8216;&#8221;).parent(&#8220;&#8216;)<br />
                                .split(&#8216;   &#8216;).join(&#8216;&#8221;).prev(&#8220;&#8216;)<br />
                                .split(&#8216; ~ &#8216;).join(&#8216;&#8221;).prevAll(&#8220;&#8216;)<br />
                                .split(/\s /).join(&#8216;&#8221;).parents(&#8220;&#8216;);<br />
                       return eval(&#8216;this.filter(&#8220;&#8216; selector &#8216;&#8221;).length&#8217;);<br />
                      }<br />
$.live_bind=function(selector, etype, fn)<br />
                    {$(document).bind(etype,<br />
                                      function(event)<br />
                                              {var event=event || window.event,<br />
                                               src_ele=event.srcElement || event.target;<br />
                                               if ($(src_ele).is_match(selector))<br />
                                                  {fn();<br />
                                                  }<br />
                                              }<br />
                                     );<br />
                    }</p>
<p>hello2<br />
hello3<br />
hello1<br />
hello</p>
<p>hello2<br />
hello3<br />
hello1</p>
<p>function alr(){alert(&#8216;helloooo&#8217;);}<br />
$.live_bind(&#8220;.kkkk  .ppp1   .ppp[title='333']&#8220;, &#8216;click&#8217;, alr);<br />
$(&#8216;.kkkk&#8217;).append(&#8216;hello&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/comment-page-1/#comment-45</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 31 May 2008 13:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=10#comment-45</guid>
		<description>Here&#039;s what&#039;s interesting (in response to to Antonelli&#039;s post above):

My (admittedly non-scientific) testing has shown that IE6 will still lose its lunch over this loop structure:

for(var i=0, len = $$(’div.contents’).length; i&lt;len; i ){ /** .. */ }

Yes, it *should* work as the value of the length should be cached--but everything that I&#039;ve seen from what IE6&#039;s JScript parser is that is NOT the case.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s what&#8217;s interesting (in response to to Antonelli&#8217;s post above):</p>
<p>My (admittedly non-scientific) testing has shown that IE6 will still lose its lunch over this loop structure:</p>
<p>for(var i=0, len = $$(’div.contents’).length; i<len; i ){ /** .. */ }</p>
<p>Yes, it *should* work as the value of the length should be cached&#8211;but everything that I&#8217;ve seen from what IE6&#8217;s JScript parser is that is NOT the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/comment-page-1/#comment-44</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Sat, 31 May 2008 12:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=10#comment-44</guid>
		<description>Ah, Little Johnny Toggler and his wonderful for loop. 

The overaching problem (IMHO) isn&#039;t just DOM traversal, but a gross lack of understanding of the way IE6 (and to a lesser degree IE7) looks up pointer references in JavaScript.

Man, we need team blog/discussion forum.</description>
		<content:encoded><![CDATA[<p>Ah, Little Johnny Toggler and his wonderful for loop. </p>
<p>The overaching problem (IMHO) isn&#8217;t just DOM traversal, but a gross lack of understanding of the way IE6 (and to a lesser degree IE7) looks up pointer references in JavaScript.</p>
<p>Man, we need team blog/discussion forum.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/comment-page-1/#comment-42</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Fri, 30 May 2008 23:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=10#comment-42</guid>
		<description>$$ has been heavily optimized since it first appeared in the Prototype framework so I wouldn&#039;t be too afraid of using it; however, it does not make up for this code. Tell me who did this so I can smack them. Also, to improve performance, remove the life of a variable (letting garbage collection remove it sooner too) do this:

for(var i=0, len = $$(&#039;div.contents&#039;).length; i&lt;len; i  ){ /** .. */ }

Sorry for trolling your blog, I got bored and saw the link from your LinkedIn profile. :)</description>
		<content:encoded><![CDATA[<p>$$ has been heavily optimized since it first appeared in the Prototype framework so I wouldn&#8217;t be too afraid of using it; however, it does not make up for this code. Tell me who did this so I can smack them. Also, to improve performance, remove the life of a variable (letting garbage collection remove it sooner too) do this:</p>
<p>for(var i=0, len = $$(&#8216;div.contents&#8217;).length; i&lt;len; i  ){ /** .. */ }</p>
<p>Sorry for trolling your blog, I got bored and saw the link from your LinkedIn profile. <img src='http://briancrescimanno.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/comment-page-1/#comment-39</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 29 May 2008 15:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=10#comment-39</guid>
		<description>Very interesting post on your site, Eric.  You are right in your assessment that the short-hand nature of the $() method can encourage poor practices.  Thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>Very interesting post on your site, Eric.  You are right in your assessment that the short-hand nature of the $() method can encourage poor practices.  Thanks for the feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric DeLabar</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/comment-page-1/#comment-38</link>
		<dc:creator>Eric DeLabar</dc:creator>
		<pubDate>Thu, 29 May 2008 15:09:12 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=10#comment-38</guid>
		<description>At my employer we&#039;re dealing with some similar performance problems, as much as I love prototype, in the wrong hands its a very dangerous tool.  I suppose it&#039;s a case of learning by scraping you fingers with a hand tool before you cut them off entirely with a power tool.

If you&#039;re interested, my link goes to a post I wrote on my website talking about a similar performance problem with the &#039;$&#039; function.  It also includes some performance metrics on a few different browsers.</description>
		<content:encoded><![CDATA[<p>At my employer we&#8217;re dealing with some similar performance problems, as much as I love prototype, in the wrong hands its a very dangerous tool.  I suppose it&#8217;s a case of learning by scraping you fingers with a hand tool before you cut them off entirely with a power tool.</p>
<p>If you&#8217;re interested, my link goes to a post I wrote on my website talking about a similar performance problem with the &#8216;$&#8217; function.  It also includes some performance metrics on a few different browsers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
