<?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"
	>
<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 Ajax, Flex, and Rich Internet Applications</description>
	<pubDate>Thu, 04 Dec 2008 03:05:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: diyism</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/#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 "jQuery Live Bind":



$.fn.is_match=function(selector)
                      {selector=selector.split(/\s /).reverse().join(' ')
                                .split(' &#62; ').join('").parent("')
                                .split('   ').join('").prev("')
                                .split(' ~ ').join('").prevAll("')
                                .split(/\s /).join('").parents("');
                       return eval('this.filter("' selector '").length');
                      }
$.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('helloooo');}
$.live_bind(".kkkk  .ppp1   .ppp[title='333']", 'click', alr);
$('.kkkk').append('hello');
</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(&#8217; &#8216;)<br />
                                .split(&#8217; &gt; &#8216;).join(&#8217;&#8221;).parent(&#8221;&#8216;)<br />
                                .split(&#8217;   &#8216;).join(&#8217;&#8221;).prev(&#8221;&#8216;)<br />
                                .split(&#8217; ~ &#8216;).join(&#8217;&#8221;).prevAll(&#8221;&#8216;)<br />
                                .split(/\s /).join(&#8217;&#8221;).parents(&#8221;&#8216;);<br />
                       return eval(&#8217;this.filter(&#8221;&#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(&#8217;helloooo&#8217;);}<br />
$.live_bind(&#8221;.kkkk  .ppp1   .ppp[title='333']&#8220;, &#8216;click&#8217;, alr);<br />
$(&#8217;.kkkk&#8217;).append(&#8217;hello&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://briancrescimanno.com/2008/05/29/performance-is-in-the-details/#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's what's interesting (in response to to Antonelli'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've seen from what IE6'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-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'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-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'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 = $$('div.contents').length; i&#60;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 = $$(&#8217;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-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-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'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'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're interested, my link goes to a post I wrote on my website talking about a similar performance problem with the '$' 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>

<!-- Dynamic Page Served (once) in 0.568 seconds -->
