<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AaronStaves.com &#187; Dojo</title>
	<atom:link href="http://aaronstaves.com/category/dojo/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronstaves.com</link>
	<description>Not quite extinct!</description>
	<lastBuildDate>Fri, 01 Apr 2011 20:04:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>AOL CDN FTW</title>
		<link>http://aaronstaves.com/2008/05/05/aol-cdn-ftw/</link>
		<comments>http://aaronstaves.com/2008/05/05/aol-cdn-ftw/#comments</comments>
		<pubDate>Mon, 05 May 2008 22:33:15 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[aol]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://aaronstaves.com/?p=19</guid>
		<description><![CDATA[So lately I've started undergoing (yet another) personal project. Basically a file request and upload system that will be using the Dojo Grid. Initially I was going to try using a few other widgets from the Dojo family, but decided that it was time to revisit the Grid and see how much it has progressed [...]]]></description>
			<content:encoded><![CDATA[<p>So lately I've started undergoing (yet another) personal project.  Basically a file request and upload system that will be using the <a title="Dojo Grid" href="http://dojotoolkit.org/book/dojo-book-0-9/docx-documentation-under-development/grid">Dojo Grid</a>.  Initially I was going to try using a few other widgets from the Dojo family, but decided that it was time to revisit the Grid and see how much it has progressed since Dojo 1.0.2.</p>
<p>Initially when I was using it, I couldn't understand why my page was loading so slow.  When I slow, I mean <strong>slow</strong>; enough to the point that the browser would give you the whole <strong>this page could be doing bad things, would you like to stop scripts on this page?</strong> slow. Yeah I have a few <a title="XMLHttpRequest" href="http://en.wikipedia.org/wiki/XHR">XHR</a>'s here and there, but nothing out of the ordinary.  The only thing I could find was that commenting out Dojo requires for the actual Grid dijit improved performance immensely, but how am I supposed to use a grid if I can't include it!  I didn't really remember Dojo's demo being slow at all, so I went to investigate on their site.</p>
<p>Copying their example line-for-line worked like a charm.  It loaded up nice and quick, no problems, no lag and <em>none of it was my code</em>.  So I began to tweak a few things to try and get my data in the grid.  First off, I noticed that they were making their includes from the <a title="AOL CDN" href="http://dev.aol.com/dojo">AOL CDN</a>.  I've heard about this but never really looked that much into it (as I probably <a title="Content Delivery Network" href="http://en.wikipedia.org/wiki/Content_delivery_network">should have</a>).  So I took it out, and replaced it with includes from our <a title="DreamHost Homepage" href="http://dreamhost.com">DreamHost</a> server.  Upon doing that, and reloading, <strong>this is where the slow down was from</strong>.</p>
<p>Don't get me wrong, DreamHost is a great hosting company, but lets face it - you get what you pay for.  $90 for two years of hosting, you can't really expect to get lightning fast connections and/or a dedicated machine as your server.  Their notorious slow load times had to be the bottleneck that was killing my code.  For those not in the know: Dojo require statements essentially make requests to grab all the dojo files that they need.  For a heavy duty dijit like the grid, this can add up to <em>a lot</em> of requests!  And making these requests through the DH server was what was slowing me down.</p>
<p>So basically, using AOL's CDN to host all the Dojo includes make things insanely faster (load times below!).  I guess fast javascript isn't enough, but when dealing with massive JS requests and includes, having a fast host is just as important.  Lesson Learned!</p>
<h3>DreamHost Hosted Example - Load Time: 27.86s</h3>
<p><a title="DreamHost Hosted Dojo Grid" href="http://aaronstaves.com/content/gridTestDH.html">(link)</a></p>
<p><a href="http://aaronstaves.com/wp-content/uploads/2008/05/picture-4.png"><img class="alignnone size-medium wp-image-20" title="DH Dojo Grid" src="http://aaronstaves.com/wp-content/uploads/2008/05/picture-4-300x168.png" alt="DH Dojo Grid Load Time" width="300" height="168" /></a></p>
<h3>AOL CDN Hosted Example - Load Time: 2.96s</h3>
<p><a title="AOL CDN Hosted Dojo Grid" href="http://aaronstaves.com/content/gridTestAOLCDN.html">(link)</a></p>
<p><a href="http://aaronstaves.com/wp-content/uploads/2008/05/picture-5.png"><img class="alignnone size-medium wp-image-21" title="AOL CDN Dojo Grid" src="http://aaronstaves.com/wp-content/uploads/2008/05/picture-5-300x168.png" alt="AOL CDN Dojo Hosted Grid" width="300" height="168" /></a></p>
<p>Wow.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaronstaves.com/2008/05/05/aol-cdn-ftw/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

