<?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: Beware of JavaScript Library&#160;Overkill</title>
	<atom:link href="http://particletree.com/notebook/beware-of-javascript-library-overkill/feed/" rel="self" type="application/rss+xml" />
	<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/</link>
	<description>Everyone needs a hug.</description>
	<pubDate>Wed, 19 Nov 2008 12:07:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: fritz from london</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2344</link>
		<dc:creator>fritz from london</dc:creator>
		<pubDate>Tue, 10 Oct 2006 11:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2344</guid>
		<description>&lt;p&gt;I just discovered that using enumerables is considerably slower than a traditional loop.&lt;/p&gt;

&lt;p&gt;Well done Sherlock! Next week: Ryan Campbell discovers tea is much nicer when made with hot water instead of cold ;-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I just discovered that using enumerables is considerably slower than a traditional loop.</p>

<p>Well done Sherlock! Next week: Ryan Campbell discovers tea is much nicer when made with hot water instead of cold ;-)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Gal Steinitz</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2343</link>
		<dc:creator>Gal Steinitz</dc:creator>
		<pubDate>Mon, 02 Oct 2006 05:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2343</guid>
		<description>&lt;p&gt;Another problem with the .each method is that regular error exceptions aren't thrown, presumably because of the mechanism Cory Hudson described above.  I had to had my own try/catch block around my code just to get a little error reporting.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another problem with the .each method is that regular error exceptions aren&#8217;t thrown, presumably because of the mechanism Cory Hudson described above.  I had to had my own try/catch block around my code just to get a little error reporting.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Cory Hudson</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2342</link>
		<dc:creator>Cory Hudson</dc:creator>
		<pubDate>Thu, 14 Sep 2006 11:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2342</guid>
		<description>&lt;p&gt;Thanks for showing us these stats. The reason Prototype's each is so slow is that for every iteration through the loop, it runs a try/catch block around the function you passed in. Why? Because it emulates using break and continue statements. The catch is that to use them you have to use "throw $continue" or "throw $break" in your loop function to mimic the native functionality. It's actually a rather ingenius solution, it just comes with a big performance hit.&lt;/p&gt;

&lt;p&gt;I talk a little bit about this and the new &lt;a href="http://mootools.net" rel="nofollow"&gt;mootools&lt;/a&gt; JavaScript library's own each method at:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.coryhudson.com/blog/2006/09/14/useful-utility-functions-in-mootools/" rel="nofollow"&gt;http://www.coryhudson.com/blog/2006/09/14/useful-utility-functions-in-mootools/&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for showing us these stats. The reason Prototype&#8217;s each is so slow is that for every iteration through the loop, it runs a try/catch block around the function you passed in. Why? Because it emulates using break and continue statements. The catch is that to use them you have to use &#8220;throw $continue&#8221; or &#8220;throw $break&#8221; in your loop function to mimic the native functionality. It&#8217;s actually a rather ingenius solution, it just comes with a big performance hit.</p>

<p>I talk a little bit about this and the new <a href="http://mootools.net" rel="nofollow">mootools</a> JavaScript library&#8217;s own each method at:</p>

<p><a href="http://www.coryhudson.com/blog/2006/09/14/useful-utility-functions-in-mootools/" rel="nofollow">http://www.coryhudson.com/blog/2006/09/14/useful-utility-functions-in-mootools/</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Palmer</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2341</link>
		<dc:creator>Justin Palmer</dc:creator>
		<pubDate>Wed, 06 Sep 2006 00:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2341</guid>
		<description>&lt;p&gt;Ryan, great post, and a friendly reminder that when performance is top priority, anything that isn't native will be considerably slower than a custom solution.&lt;/p&gt;

&lt;p&gt;Firefox, Webkit, and Opera(to some extent) have support for Iterators like forEach, map, etc.  I think we'll probably see future versions of Prototype delegate to these native methods in future releases.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ryan, great post, and a friendly reminder that when performance is top priority, anything that isn&#8217;t native will be considerably slower than a custom solution.</p>

<p>Firefox, Webkit, and Opera(to some extent) have support for Iterators like forEach, map, etc.  I think we&#8217;ll probably see future versions of Prototype delegate to these native methods in future releases.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Kumar</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2340</link>
		<dc:creator>Andrew Kumar</dc:creator>
		<pubDate>Tue, 05 Sep 2006 18:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2340</guid>
		<description>&lt;p&gt;Thanks m8!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks m8!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mislav</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2339</link>
		<dc:creator>Mislav</dc:creator>
		<pubDate>Tue, 05 Sep 2006 15:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2339</guid>
		<description>&lt;p&gt;Ryan, while you're doing these test it would be neat to test javascript 1.7 iterators in Firefox 2!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ryan, while you&#8217;re doing these test it would be neat to test javascript 1.7 iterators in Firefox 2!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Messier</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2338</link>
		<dc:creator>Thomas Messier</dc:creator>
		<pubDate>Tue, 05 Sep 2006 15:09:13 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2338</guid>
		<description>&lt;p&gt;I've actually been wanting to become an Enumerable convert, and you haven't discouraged me. More complex functionality is bound to lead to slower results, but it's usually negligible for most applications. However, thanks for doing that, because in the event that I do something dealing with more data, I'll already know where my problem lies.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve actually been wanting to become an Enumerable convert, and you haven&#8217;t discouraged me. More complex functionality is bound to lead to slower results, but it&#8217;s usually negligible for most applications. However, thanks for doing that, because in the event that I do something dealing with more data, I&#8217;ll already know where my problem lies.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Campbell</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2337</link>
		<dc:creator>Ryan Campbell</dc:creator>
		<pubDate>Tue, 05 Sep 2006 14:46:16 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2337</guid>
		<description>&lt;p&gt;Kumar, it was IE6.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Kumar, it was IE6.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Benedict</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2336</link>
		<dc:creator>Greg Benedict</dc:creator>
		<pubDate>Tue, 05 Sep 2006 14:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2336</guid>
		<description>&lt;p&gt;Accessing forms with $F(id) is very heavy as well. We've been working on a revenue/expense forecasting application for a customer that will run on IE 6 on hardware that is 3-4 years old. In firefox it was barely noticeable, but in IE it was nearly 14 seconds to run the new calculations when you changed values. Once we pulled it out and did a more direct style of access, document.forms, it was down to about 2.5 seconds. That's a huge difference.&lt;/p&gt;

&lt;p&gt;I love prototype for it's simplicity, but you have to watch out on large/complex pages. Even with the latest and greatest version, IE still bleeds a large amount of memory.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Accessing forms with $F(id) is very heavy as well. We&#8217;ve been working on a revenue/expense forecasting application for a customer that will run on IE 6 on hardware that is 3-4 years old. In firefox it was barely noticeable, but in IE it was nearly 14 seconds to run the new calculations when you changed values. Once we pulled it out and did a more direct style of access, document.forms, it was down to about 2.5 seconds. That&#8217;s a huge difference.</p>

<p>I love prototype for it&#8217;s simplicity, but you have to watch out on large/complex pages. Even with the latest and greatest version, IE still bleeds a large amount of memory.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Arthur</title>
		<link>http://particletree.com/notebook/beware-of-javascript-library-overkill/#comment-2335</link>
		<dc:creator>Arthur</dc:creator>
		<pubDate>Tue, 05 Sep 2006 10:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://s2462.gridserver.com/wordpress/?p=227#comment-2335</guid>
		<description>&lt;p&gt;Even though my AI in JavaScript is being spread around the Web to such sites as &lt;a href="http://saintstephen.memebot.com/aimind/index.html" rel="nofollow"&gt;http://saintstephen.memebot.com/aimind/index.html&lt;/a&gt; I am still a rank beginner in JavaScript and I did not even know that JavaScript had libraries, so I am thankful for the information.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Even though my AI in JavaScript is being spread around the Web to such sites as <a href="http://saintstephen.memebot.com/aimind/index.html" rel="nofollow">http://saintstephen.memebot.com/aimind/index.html</a> I am still a rank beginner in JavaScript and I did not even know that JavaScript had libraries, so I am thankful for the information.</p>]]></content:encoded>
	</item>
</channel>
</rss>

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