<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Page comments</title>
		<link>http://www.silverstripe.org/home/</link>
		<atom:link href="http://www.silverstripe.org/home/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title></title>
			<link>http://www.silverstripe.org/javascript-performance/#PageComment_9991</link>
			<description>Simon,<br />There is certainly a potential problem with events taking a while to fire, if you bind too many delegates/on handlers on a top-level element like &amp;quot;body&amp;quot;. Doing that would mean that every event has to run through many handlers before finding the correct one, thereby slowing event processing. However, in practice, I&#39;ve never found this to be a problem. I&#39;ve found start-up time far more problematic than event execution time. <br /><br />Still, you make a good point, we need to be careful and bind delegate/on events to as specific elements in the DOM as possible. That mitigates the potential problem of slow event firing. So, instead of binding to &amp;quot;body&amp;quot;, you would bind to &amp;quot;#navigation&amp;quot;, as an example.<br /><br />Matt,<br />You are totally correct that delegation has been part of jQuery for a long time. However, in 1.7, with the new &amp;quot;on&amp;quot; method, it has become the recommend default way of binding any event. The jQuery team  substantially improved delegate performance in the 1.7 version. See this blog post:<br /> http://blog.jquery.com/2011/11/03/jquery-1-7-released/<br /><br />So, while you could write delegates before 1.7, they weren&#39;t appropriate in every situation. Now, however, you can do so as the default. The new &amp;quot;on&amp;quot; method is always the right choice :)<br /><br />Happy Javascripting,<br />Julian</description>
			<pubDate>Mon, 18 Jun 2012 11:10:17 +1200</pubDate>
			<dc:creator>Julian Seidenberg</dc:creator>
			<guid>http://www.silverstripe.org/javascript-performance/#PageComment_9991</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.silverstripe.org/javascript-performance/#PageComment_9986</link>
			<description>I noticed that these tests only consider startup time. Have you tested the relative performance of the events actually firing compared to how they&#39;re added?</description>
			<pubDate>Thu, 14 Jun 2012 19:31:14 +1200</pubDate>
			<dc:creator>Simon</dc:creator>
			<guid>http://www.silverstripe.org/javascript-performance/#PageComment_9986</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.silverstripe.org/javascript-performance/#PageComment_9984</link>
			<description>Actually, regarding #7, proper event delegation in jQuery has been around since 1.4.2 (http://api.jquery.com/delegate/). I say &amp;quot;proper&amp;quot; because there technically was event delegation since 1.3 but it hadn&#39;t found its true name yet (http://api.jquery.com/live/)</description>
			<pubDate>Thu, 14 Jun 2012 14:03:33 +1200</pubDate>
			<dc:creator>Matt</dc:creator>
			<guid>http://www.silverstripe.org/javascript-performance/#PageComment_9984</guid>
		</item>
		

	</channel>
</rss>