<?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>onenaught.com &#187; Performance</title>
	<atom:link href="http://www.onenaught.com/posts/category/performance/feed" rel="self" type="application/rss+xml" />
	<link>http://www.onenaught.com</link>
	<description>A blog on web standards, accessibility, css, javascript, xslt, and more</description>
	<lastBuildDate>Thu, 07 Oct 2010 09:26:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
		<title>One Naught</title>
		<url>http://www.onenaught.com/wp-content/themes/onenaught/images/onenaught.png</url>
		<link>http://www.onenaught.com</link>
		<width>116</width>
		<height>130</height>
		<description>OneNaught.com</description>
	</image>		<item>
		<title>XSLT Performance tip: don&#8217;t indent output</title>
		<link>http://www.onenaught.com/posts/352/xslt-performance-tip-dont-indent-output</link>
		<comments>http://www.onenaught.com/posts/352/xslt-performance-tip-dont-indent-output#comments</comments>
		<pubDate>Tue, 20 Oct 2009 11:01:01 +0000</pubDate>
		<dc:creator>Anup Shah</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.onenaught.com/?p=352</guid>
		<description><![CDATA[When transforming XML via XSLT, make sure the output setting for indenting is turned off and honoured by your code.

Turning it off will often speed up the transform and save a bit of output size.]]></description>
			<content:encoded><![CDATA[<h3 id="toc-summary-turn-off-xsl-output-indenting">Summary: turn off xsl output indenting</h3>
<p>When transforming XML via XSLT, make sure the output setting for indenting is turned off and honoured by your code.</p>
<p>Turning it off will</p>
<ul>
<li>Speed up the transform time</li>
<li>Reduce the output size</li>
</ul>
<h3 id="toc-how-is-xslt-output-indent-turned-off">How is XSLT output indent turned off?</h3>
<p>Indenting output should be off by default. If for whatever reason it is not, it can be turned off simply by using this:</p>
<pre class="syntax-highlight:xslt">
&lt;xsl:output indent=&quot;no&quot; /&gt;
</pre>
<p>I have seen a lot of .NET XSLT ignore this important setting. Sometimes it is because the output is written to a stream or something else which doesn’t take the output settings from the XSLT.</p>
<p>When transforming to an <code>XmlWriter</code> in .NET, be sure to correctly create the XML Writer using the overload that takes in output settings obtained from a loaded XSLT. E.g:</p>
<pre class="syntax-highlight:c#">
XslCompiledTransform xslt = GetXslt(XsltPath);

// The 2nd argument honours XSLT the output settings!
using (XmlWriter w = XmlWriter.Create(sb, xslt.OutputSettings))
{
    XsltArgumentList args = GetXsltArgs();

    XPathNavigator navigator = _someXmlData.CreateNavigator();

    if (navigator == null)
        throw new NullReferenceException(&quot;navigator&quot;);

    if (w == null)
        throw new NullReferenceException(&quot;w&quot;);

    xslt.Transform(navigator, args, w);
}
</pre>
<p>(<a href="http://www.w3schools.com/xsl/el_output.asp"><code>xsl:output</code></a> has many other useful attributes worth looking into.)</p>
<h3 id="toc-what-kind-of-savings-do-you-get">What kind of savings do you get?</h3>
<p>The savings will differ for many reasons (the XML document size, the structure of the XML, the types of transformation being done etc etc), so it is hard to give a definitive savings. But here&#8217;s an illustrative example:</p>
<p>A few weeks back, a colleague at work was having trouble with an XSLT that was taking a long time to transform.</p>
<p>We started to have a look; I was expecting to find inefficient XPath, or an XML document structure that wasn&#8217;t conducive to decent transformation speed, or something like that.</p>
<p>However, I noticed the first thing was his output was set to be indented, and the XML input was HUGE.</p>
<p>So, the first thing we did was turn it off.</p>
<p>That alone <strong>reduced a 12 minute transform (on a 300MB document) to just 1 minute!</strong></p>
<p>In another scenario, a 70K XML document was taking about 0.25 seconds to transform. Turning off indenting shaved a few more  milliseconds (can&#8217;t remember exact amount now) &#8212; and saved about 2K in the output HTML that it generated.</p>
<h3 id="toc-why-can-this-make-such-a-difference">Why can this make such a difference?</h3>
<p>I think the specifics may vary depending on the XSLT parser you are using, but I believe it is basically this:</p>
<ul>
<li>Each newline/white space/tab(s) created for the indent requires an extra text node to contain these characters which requires extra memory (though at this point may not add that much time to the transformation).</li>
<li>When the transform is then saved to a file, or written out to an output stream strings are often involved. String processing can be expensive in many programming languages, so each of these indented text nodes needs handling. For very large documents (as above) this can require a lot of unnecessary processing.</li>
</ul>
<h3 id="toc-but-doesnt-this-make-the-output-harder-to-read">But doesn&#8217;t this make the output harder to read?</h3>
<p>The consumer of a transformation result is likely to be another process such as another XSLT in a pipeline, another process, or even a web browser.</p>
<p>None of these typically care about the extra white space, which also would require more processing when loading.</p>
<p>If you need to view the XML, it may be worth keeping the indent off and manually opening it in a text editor that has the ability to &#8220;pretty print&#8221; it for you. (Warning: some editors and IDEs, e.g. Visual Studio, can do automatically pretty print an XML document for you when you open it, making you think the XML itself had the indented output!)</p>
<h3 id="toc-other-savings-are-still-possible">Other savings are still possible</h3>
<p>Turning off the indent is just one of many things you can look into. Other things include the following (though your mileage may vary):</p>
<ul>
<li>Use attributes instead of elements (where possible; usually this is for simple values, such as numbers, dates, and very limited strings, and where the element is not expected to be indented)</li>
<li>Look at the XML structure to see if can be improved to make XSLT processing easier</li>
<li>Cache the XSLT Processor</li>
<li>Cache the output</li>
</ul>
<p>I&#8217;ll try to expand on some of those in future posts.</p>
<p>Some more detailed <a href="http://www.onenaught.com/posts/23/xslt-tips-for-cleaner-code-and-better-performance">XSLT performance tips which also created cleaner code</a> were covered in an earlier post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onenaught.com/posts/352/xslt-performance-tip-dont-indent-output/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google App Engine as your own Content Delivery Network</title>
		<link>http://www.onenaught.com/posts/204/google-app-engine-as-cdn</link>
		<comments>http://www.onenaught.com/posts/204/google-app-engine-as-cdn#comments</comments>
		<pubDate>Sat, 06 Dec 2008 14:45:37 +0000</pubDate>
		<dc:creator>Anup Shah</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.onenaught.com/?p=204</guid>
		<description><![CDATA[<img class="post-img" align="left" src="/wp-content/uploads/appengine.gif" alt="" /> 24 Ways has an excellent article on using Google App Engine as your own Content Delivery Network.

A CDN is a network of servers around the world to serve content from your site from the nearest physical location. All the large sites (Yahoo, Google, Amazon, etc) use them.

After reading the above post, I was also curious to find out how if Google App Engine helps in the following: compression, expires headers and versioning. It looks like it does.]]></description>
			<content:encoded><![CDATA[<p><img class="post-img" src="http://www.onenaught.com/wp-content/uploads/appengine.gif" alt="" /> 24 Ways has an excellent article on <a href="http://24ways.org/2008/using-google-app-engine-as-your-own-cdn">using Google App Engine as your own Content Delivery Network</a>, showing you how easy it is to set one up.</p>
<p>A CDN is a network of servers around the world to serve content from your site from the nearest physical location. All the large sites (Yahoo, Google, Amazon, etc) use them.</p>
<p>After reading the above post, I was also curious to find out how if Google App Engine helps in the following:</p>
<ul>
<li>Compression</li>
<li>Expires headers and versioning</li>
</ul>
<p>A comment in the original post implies compression is on by default, which is what I&#8217;d expect.</p>
<p><a href="http://www.onenaught.com/posts/17/web-site-performance-expires-header">Using far future expires headers can be a great performance boost for your site</a>, and is easy to apply to assets such as images, CSS, and JavaScript files.</p>
<p>At the same time, if you change such a file you want to be sure your repeat visitors will not see the old one because it was cached far into the future.</p>
<p>So, with a simple URL Rewrite Rule we can make things like <code>/css/version-1/site.css</code> point to <code>/css/site.css</code>.</p>
<p>If you update <code>site.css</code>, you can change the version number. Browsers will not have a file from this new path in their cache so will download it and cache it into the future again.</p>
<p>Is it possible to do this with Google App Engine? <a href="http://code.google.com/appengine/docs/configuringanapp.html">It looks promising</a>&#8230;</p>
<p>If I can find a spare moment, I may try this out on this site (which, admittedly doesn&#8217;t get that much traffic to make it worth bothering about!) &#8212; and then I&#8217;ll try it on a site that takes up most of my spare time, which gets a LOT of traffic, where it would actually be worth doing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onenaught.com/posts/204/google-app-engine-as-cdn/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Google to host a number of JavaScript libraries</title>
		<link>http://www.onenaught.com/posts/80/google-to-host-a-number-of-javascript-libraries</link>
		<comments>http://www.onenaught.com/posts/80/google-to-host-a-number-of-javascript-libraries#comments</comments>
		<pubDate>Wed, 28 May 2008 13:01:32 +0000</pubDate>
		<dc:creator>Anup Shah</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.onenaught.com/?p=80</guid>
		<description><![CDATA[<img src="http://www.onenaught.com/wp-content/uploads/js-libraries.png" alt="" class="post-img" align="left" /> <a href="http://ajaxian.com/archives/announcing-ajax-libraries-api-speed-up-your-ajax-apps-with-googles-infrastructure">Google just announced their AJAX Library API</a>, where Google will host many major JavaScript frameworks for you, such as jQuery, Prototype, Mootools, Dojo, etc.

This will allow you to write web pages that refer to those scripts rather than copies on your own site, reducing your bandwidth, but also leveraging the infrastructure capabilities of Google, such as their content distributed network (which means users would be served those files from a location much closer to them), properly compressed, minified, cacheable files, etc.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.onenaught.com/wp-content/uploads/js-libraries.png" alt="" class="post-img" /> <a href="http://ajaxian.com/archives/announcing-ajax-libraries-api-speed-up-your-ajax-apps-with-googles-infrastructure">Google just announced their AJAX Library API</a>, where Google will host many major JavaScript frameworks for you, such as jQuery, Prototype, Mootools, Dojo, etc.</p>
<p>This will allow you to write web pages that refer to those scripts rather than copies on your own site, reducing your bandwidth, but also leveraging the infrastructure capabilities of Google, such as their content distributed network (which means users would be served those files from a location much closer to them), properly compressed, minified, cacheable files, etc.</p>
<p>In addition, if your visitors have been to other sites using the same technique, they would not need to download the same libraries all over again, and with increasingly rich web sites, these files can get quite large.</p>
<p>So, if you use jQuery, you can use this in your web pages:</p>
<pre><code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://<strong>ajax.googleapis.com</strong>/ajax/libs/jquery/1.2.6/jquery.min.js&quot;&gt;&lt;/script&gt;</code></pre>
<p>Of course, this is not for everyone, and it may be worth bearing in mind some <a href="http://peter.michaux.ca/article/7906">concerns</a> raised by Peter Michaux, who also provides a useful way to handle the scenario where you think access to Google from the user&#8217;s location might be restricted (e.g. blocked from a paranoid office!):</p>
<pre><code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  if (!jQuery) {
    // load from your own server
    document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;/js/jquery.min.js&quot;&gt;&lt;\/script&gt;');
  }
&lt;/script&gt;
</code></pre>
<p>Still, it could be a useful technique to further improve the download/load performance for a number of sites.</p>
<p>A number of months back, Yahoo was the first to announce something like this when they said they would <a href="http://yuiblog.com/blog/2007/02/22/free-yui-hosting">host their YUI library for you</a> so it is good to see others getting into this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onenaught.com/posts/80/google-to-host-a-number-of-javascript-libraries/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web site performance: Expires Header</title>
		<link>http://www.onenaught.com/posts/17/web-site-performance-expires-header</link>
		<comments>http://www.onenaught.com/posts/17/web-site-performance-expires-header#comments</comments>
		<pubDate>Sat, 04 Aug 2007 22:34:44 +0000</pubDate>
		<dc:creator>Anup Shah</dc:creator>
				<category><![CDATA[General Web Development]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://localonenaught/posts/17/web-site-performance-expires-header</guid>
		<description><![CDATA[Ensuring the Expires header is set to the future for resources such as JavaScript, CSS and images helps increase the chance the browser will really cache those files, as research from Yahoo and Google have shown. This short post looks at how you can implement this in Apache and ASP.NET in a maintainable way.]]></description>
			<content:encoded><![CDATA[<p>A previous post on <a href="http://www.onenaught.com/posts/18/client-side-web-site-performance">client side web site performance</a> noted a number of areas where web site performance can be tuned.</p>
<p>One of the suggestions, an old one, is to <a href="http://developer.yahoo.com/performance/rules.html#expires">set the HTTP Expires header well into the future</a>, especially for resources that your page uses such as images, CSS and JavaScript files, so that the browser almost definitely cache them. (They don&#8217;t get cached as often as you might expect!)</p>
<h3 id="toc-setting-expires-header-in-apache">Setting Expires Header in Apache</h3>
<p>With Apache, one easy way to do this is to generate a link that contains a build/version number or date in the path, e.g: /css/{build-number-or-date}/file.css</p>
<p>In Apache, in your configuration file (e.g. .htaccess if that is all you have access to) you can set the Expires header and rewrite your url to the real location.</p>
<p>For example, I have actually used the following for this web site (at time of writing):</p>
<pre><code>&lt;IfModule mod_expires.c&gt;
ExpiresActive On
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2 years"
ExpiresByType image/jpeg "access plus 2 years"
ExpiresByType image/png "access plus 2 years"
ExpiresByType text/css "access plus 2 years"
ExpiresByType text/javascript "access plus 2 years"
ExpiresByType application/x-javascript "access plus 2 years"
&lt;/IfModule&gt;</code></pre>
<p>In the rewrite rule above, things like css/1/file.css can get rewritten to css/file.css, where &#8217;1&#8242; is a build number, and css/file.css is the real location on disc.</p>
<p>This allows the developer to keep their files in a certain place and then either their build/deploy procedures (ideally) or in their code, manually, point to a build number that the rest of the world would see.</p>
<p>This way each time you deploy a change, the build number changes, the browser sees this new URL and requests it again only then.</p>
<h3 id="toc-setting-expires-header-in-asp-net">Setting Expires Header in ASP.NET</h3>
<p>With ASP.NET and IIS 6 because of the weak integration, things are not quite as easy. With IIS 7 this should be much more configurable, but for now, the basic thing to do is to consider using a file extensions that will trigger ASP.NET to handle the request (e.g. .aspx). Then, you can set the expires header via ASP.NET and then use <code>RewritePath()</code> method (on the HttpContext class) to rewrite to the real file (e.g. maybe rewrite css/1/file.aspx to css/1/file.css).</p>
<p>There are numerous ways to do URL Rewriting in ASP.NET but most ultimately end up encapsulating RewritePath in some way or form. Some people have written custom configuration handlers, others can just write some bespoke code. We have used this on high volume sites for friendlier URLs, but the same principle can apply for this performance tip. <a href="http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx">Scott Guthry from Microsoft has a great write-up on using URL rewriting in ASP.NET</a>.</p>
<p>This might incur an initial performance hit (what is normally just a file served up by the web server is now processed by ASP.NET), but subsequent requests for pages that link to such resources will no longer need to communicate with the server.</p>
<h3 id="toc-why-use-url-rewriting-in-the-above-examples">Why use URL rewriting in the above examples?</h3>
<p>Why not use a querystring and avoid the rewrite altogether? Cal Henderson from Flickr answers:</p>
<blockquote><p>
According the letter of the HTTP caching specification, user agents should never cache URLs with query strings. While Internet Explorer and Firefox ignore this, Opera and Safari don’t &#8211; to make sure all user agents can cache your resources, we need to keep query strings out of their URLs.</p>
<p class="source"><cite>Cal Henderson, <a href="http://www.thinkvitamin.com/features/webapps/serving-javascript-fast">Serving JavaScript Fast</a>, May 21, 2006</cite></p>
</blockquote>
<h3 id="toc-but-wont-development-be-problematic">But won&#8217;t development be problematic?</h3>
<p>One initial concern might be that with development and constant modification of CSS and JavaScript, for example, it will be harder to test. This can be addressed to. For example, on browsers such as Firefox and Internet Explorer, a <kbd>ctrl</kbd> refresh will reload the new file.</p>
<p>This still leaves the question of how to update the version/build number without manually having to update the template each time. To do that, your code that generates the output can simply insert the build or file last modified time into the URL path (looking up the file&#8217;s last modified time might incur an extra disk hit, which may not be as good for extremely high volume sites).</p>
<p>See Cal Henderson&#8217;s article above for more ideas on that.</p>
<h3 id="toc-yahoo-offers-to-host-their-yui-framework-even-more-performance">Yahoo offers to host their YUI framework; even more performance</h3>
<p><a href="http://yuiblog.com/blog/2007/02/22/free-yui-hosting">Yahoo has offered to freely host their YUI JavaScript framework for anyone to use</a>. They configure it with all the performance suggestions they suggest, and version it in case you don&#8217;t get to update your code as and when they introduce new builds.</p>
<p>What is also interesting about this approach is that if you visit other sites that use YUI you download even less because those scripts are already cached by the browser because of the use of the Expires header.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onenaught.com/posts/17/web-site-performance-expires-header/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Client side web site performance</title>
		<link>http://www.onenaught.com/posts/18/client-side-web-site-performance</link>
		<comments>http://www.onenaught.com/posts/18/client-side-web-site-performance#comments</comments>
		<pubDate>Sat, 04 Aug 2007 21:16:48 +0000</pubDate>
		<dc:creator>Anup Shah</dc:creator>
				<category><![CDATA[General Web Development]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://localonenaught/posts/18/client-side-web-site-performance</guid>
		<description><![CDATA[Client side web site performance can be as important as server side performance (maybe even more, from the user's perceived download perspective). A number of tips and links for further information are provided in this post]]></description>
			<content:encoded><![CDATA[<p>Web developers often spend considerable (and needed) effort to ensure their architecture performs well. n-tier architectures, performance of the middle tier and databases are given top priority.</p>
<p>Oftentimes the performance of the client side (in particular the <em>perceived</em> performance/download speed) is neglected or given lower priority.</p>
<p>People at Yahoo, Google and elsewhere have found that <a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/" title="'Performance Research, Part 1: What the 80/20 Rule Tells Us about Reducing HTTP Requests', Yahoo User Interface Blog, November, 28, 2006">as much as 80% of the user&#8217;s time can be spent waiting for things other than the main HTML to download</a>. Furthermore, browsers may not be caching as many files as you think.</p>
<p>(This is not discouraging performance tuning your overall architecture of course; its no good if it takes a long time to receive the first bytes of your page in the first place!)</p>
<h3 id="toc-techniques-in-the-old-days">Techniques in the old days</h3>
<p>In the &#8220;old days&#8221; of the Internet, dial-up was the primary way to access the Internet. &#8220;Web standards&#8221; were a distant dream.</p>
<p>All sorts of tricks were used to speed up web sites: smaller images, omitting quotes in HTML attributes (yes, people went that far!), using fixed width tables in IE 5 (the best browser at the time, using <code>&lt;table style="table-layout:fixed"&gt;</code>), balancing server response buffering vs creating the whole page first and then sending it all in one response, etc.</p>
<p>But some techniques considered back then are still relevant today, e.g:</p>
<ul>
<li>Putting images on different domains (though now other resources are worth considering too)</li>
<li>Compressing the server output using gzip (a bit hit and miss on earlier versions of IIS though)</li>
<li>Cache control using the Expires header</li>
<li>Use CSS (though in those days I used it mostly for font definitions and browser sniffing was needed to load different CSS files!)</li>
</ul>
<h3 id="toc-techniques-now-some-of-the-same">Techniques now; some of the same</h3>
<p>Fast forward to now, and broadband is widespread today (but don&#8217;t forget, dial-up is still around!).</p>
<p>Web standards encourage CSS-based layouts, reducing overall HTML bloat (some pages my colleagues and I have converted are 75, even 80% smaller!). Table-based layout and the font tag are mostly put to rest by people using such techniques (though its easy to forget that even into 2007 most of the web is not this way, and even with modern techniques we sometimes see sites where &#8220;div-bloat&#8221; and &#8220;span-itis&#8221; replace table- and font-heavy HTML!).</p>
<p>Web pages are also a lot richer these days, especially with &#8220;Web 2.0&#8243;. This requires far more JavaScript than in the past, increased use of flash, larger CSS files and images for a richer (hopefully more usable!) experience.</p>
<p>Nate Koechley, a senior developer a Yahoo gave a great presentation at @media07, called <a href="http://nate.koechley.com/blog/2007/06/12/high-performance-web-sites/">High Performance Web Sites</a> summarizing a number of recent findings and suggestions.</p>
<p>In recent months, others at Yahoo as well as Google and elsewhere have been providing a lot of analysis. Perhaps the highest level summary guidelines would be the following:</p>
<ul>
<li>Use GZip on all text-based output (which should be optimized anyway via web standards!)</li>
<li>Try to reduce the number of HTTP requests (e.g. combine CSS and JavaScript files during development or during the build process, use CSS sprites, if possible etc)</li>
<li>Help browsers ensure they can cache as many of your files as possible</li>
<li>Let browsers download your page resources in parallel even though HTTP 1.1 limits you to 2 concurrent requests from a domain (through sub-domains, minimizing or eliminating loading CSS and JavaScript in a way that blocks the browser, etc)</li>
<li>Disperse your content through things like content distribution and extra sub-domains (though be aware of extra DNS-lookups that might result)</li>
</ul>
<p>Rather than dive into the details here (for now), the following may be useful starting points:</p>
<h3 id="toc-further-reading">Further reading</h3>
<ul class="more-info">
<li>
		<a href="http://developer.yahoo.com/performance/">Exceptional Performance</a> from the Yahoo Developer Network. Some gems from them include the following
<ul>
<li><a href="http://developer.yahoo.com/performance/rules.html">Thirteen Simple Rules for Speeding Up Your Web Site</a></li>
<li><a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/">What the 80/20 Rule Tells Us about Reducing HTTP Requests</a></li>
<li><a href="http://yuiblog.com/blog/2007/01/04/performance-research-part-2/">Browser Cache Usage &#8211; Exposed!</a></li>
<li><a href="http://yuiblog.com/blog/2007/03/01/performance-research-part-3/">When the Cookie Crumbles</a></li>
<li><a href="http://yuiblog.com/blog/2007/04/11/performance-research-part-4/">Maximizing Parallel Downloads in the Carpool Lane</a></li>
</ul>
</li>
<li><a href="http://www.die.net/musings/page_load_time/">Optimizing Page Load Time</a> from a Google engineer. (One of the many interesting tips was to ensure HTTP keep-alives were enabled. They usually are but for a major client of ours last year as we launched a new web site, all was fine until the actual launch day when things were so slow. For a couple of days the hardware engineers were looking into this and had brought in a Cisco engineer. I decided to have a quick look. Using the excellent <a href="http://livehttpheaders.mozdev.org/">LiveHttpHeaders</a> extension for Firefox, I noticed that HTTP keep-alives were not set. There had been some hardware problems or something which turned this off. Amazing how much difference this setting can make!)</li>
<li><a href="http://www.thinkvitamin.com/features/webapps/serving-javascript-fast">Serving JavaScript fast</a> from Vitamin. (Lots of good stuff here. See also the note about Apache&#8217;s mod_gzip and mod_deflate. In short, use mod_deflate if you can.)</li>
<li><a href="http://dev.opera.com/articles/view/efficient-javascript/">Efficient JavaScript</a> from Dev Opera</li>
<li><a href="http://www.fiftyfoureleven.com/weblog/web-development/programming-and-scripts/reducing-http-requests">Reducing HTTP requests</a> from fiftyfoureleven.com (also makes a note about the impact of http packet sizes worth reading)</li>
</ul>
<h3 id="toc-some-useful-tools">Some useful tools</h3>
<ul class="more-info">
<li><a href="http://developer.yahoo.com/yslow/">YSlow</a> is a plugin for Firebug that measures the 13 tips Yahoo mentions (see articles above)</li>
<li><a href="http://www.getfirebug.com/">Firebug</a> extension for Firefox is indispensable for all manner of web development. It has a tab graphically to show content being requested, how long it takes, etc. Very useful to visually see how well your page components download</li>
<li><a href="http://livehttpheaders.mozdev.org/">LiveHttpHeaders</a> extension for Firefox allows you to see HTTP traffic in real time</li>
<li><a href="http://www.blunck.se/iehttpheaders/iehttpheaders.html">iehttpheaders</a> is plugin for Internet Explorer, similar to LiveHttpHeaders</li>
<li>JavaScript minification tools:
<ul>
<li><a href="http://www.crockford.com/javascript/jsmin.html">JSMin</a></li>
<li><a href="http://dojotoolkit.org/docs/shrinksafe">shrinksafe</a></li>
</ul>
</li>
</ul>
<p>As an aside, JavaScript minification tools help eliminate white space, replace variable/function names etc in with smaller tokens. (Similar tools for CSS also exist.) A few thoughts/observations on these tools:</p>
<p>If you had only once choice, go with gzip. You can combine it too.</p>
<p>Some time ago I wondered if minification might actually reduce the repeating patterns that make compression effective. A quick test found it was better to <em>avoid</em> minification. I unfortunately never saved the test files.</p>
<p>I asked Nate Koechely about this at the above conference, and he also mentioned JSMin and shrinksafe. Those were the ones I had used so that night I tested again but of course with different JavaScript files. I think one of these tools had also been updated since. The test yielded <strong>better results by combining minification and gzip compression</strong>.</p>
<p>I will try some further tests in the future as it may be either the type of JavaScript file, the tool being used or a combination. A build/development process to make this maintainable and debuggable will also be important to consider.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onenaught.com/posts/18/client-side-web-site-performance/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

