<?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>TimKadlec.com &#187; Performance</title>
	<atom:link href="http://timkadlec.com/category/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://timkadlec.com</link>
	<description>A Wisconsin based web developer writing about the web.</description>
	<lastBuildDate>Tue, 15 May 2012 16:56:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Color of Speed</title>
		<link>http://timkadlec.com/2010/12/the-color-of-speed/</link>
		<comments>http://timkadlec.com/2010/12/the-color-of-speed/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 03:18:31 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=591</guid>
		<description><![CDATA[Three seconds does not always equal three seconds. Our perception of time is greatly skewed by a variety of seemingly unrelated factors, making it easy for us to perceive 3 seconds as 5 seconds, or as 1 second. Since ultimately it is how fast the user thinks our site is that matters, regardless what the [...]]]></description>
			<content:encoded><![CDATA[<p>Three seconds does not always equal three seconds. Our perception of time is greatly skewed by a variety of seemingly unrelated factors, making it easy for us to perceive 3 seconds as 5 seconds, or as 1 second. Since ultimately it is how fast the user <em>thinks</em> our site is that matters, regardless what the stats say, we need to be very aware of these extraneous factors that influence their perception.</p>
<p>One such factor is color. Different hues, values and saturation levels can all influence how a person perceives time. Typically, this can be linked to how “relaxed” or “stressed” a user feels during the wait. The more relaxed they feel, the shorter the wait will feel. It’s entirely possible that a stressed user may feel as though a site is very slow, while a relaxed user may feel that same site is very responsive.</p>
<p>So how do we induce a feeling of relaxation using color? For starters, we can choose blue hues as they elicit the most relaxed feeling state. In sharp contrast, yellow and red hues generate more excitement and thus, more stress. Red is particularly concerning since it also induces a feeling of avoidance and failure, further increasing the level of stress.</p>
<p>Another important consideration is the saturation level of a given color. Users who view low saturation colors have been shown to be in a more relaxed state than those who view a highly saturated color. This effect is particularly emphasized in environments where contrasts are intense – like computer screens.</p>
<p>Finally, we should consider the value of colors. Pastel colors (high value) result in a more relaxed state, and therefore a shortened perception of time, than lower value colors (darker colors).</p>
<p>Using this knowledge, we can create designs that inherently imply a fast, responsive experience to the user. By no means is this a replacement for taking the time to fine-tune the performance of your site. If used in conjunction with performance optimization techniques, however, you can further optimize the experience of your users by providing them with a site that feels as responsive as the stats say it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/12/the-color-of-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Mythbusters</title>
		<link>http://timkadlec.com/2010/10/performance-mythbusters/</link>
		<comments>http://timkadlec.com/2010/10/performance-mythbusters/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 14:21:27 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=748</guid>
		<description><![CDATA[Performance optimization is the Rodney Dangerfield of web development&#8212;it &#8220;don&#8217;t get no respect&#8221;. In spite of its great importance in the overall user experience, it is all too often pushed aside and treated as an afterthought. In my conversations with designers and developers who don&#8217;t optimize, a few of the same myths are constantly brought [...]]]></description>
			<content:encoded><![CDATA[<p>Performance optimization is the Rodney Dangerfield of web development&#8212;it &#8220;don&#8217;t get no respect&#8221;. In spite of its great importance in the overall user experience, it is all too often pushed aside and treated as an afterthought. In my conversations with designers and developers who don&#8217;t optimize, a few of the same myths are constantly brought up.</p>
<ul>
<li><strong>Performance optimization isn&#8217;t that necessary.</strong> This misconception doesn&#8217;t stem from a lack of caring&#8212;most of the people I talk to truly care about crafting a good user experience for their visitors. I think this myth stems more from a lack of awareness. Most of us work on connections that are typically quite a bit faster than that of the average internet user. As a result, we experience the web differently than our users. In addition, most of the people I talk to just haven&#8217;t heard about the studies that have come out regarding the effect of performance on the user experience.</li>
<li><strong>Performance optimization is too difficult and takes too much time.</strong> The statement is often followed by &#8220;&#8230;and my clients won&#8217;t pay for all that extra time.&#8221; The prevailing belief is that you have to invest numerous hours and considerable energy to improve the performance of your site.</li>
<li><strong>High performance and beautiful design are mutually exclusive.</strong> In the early days of the web when we were browsing the internet via a dialup connection, improving performance meant removing the images from your site. On today&#8217;s web people don&#8217;t want to have to settle for a less graphically compelling site, so removing most of the images on a site isn&#8217;t a very compelling option. The fact that most sites that talk about performance optimization aren&#8217;t exactly well known for beautiful designs doesn&#8217;t help to dispel the myth.</li>
</ul>
<p>Thankfully, there&#8217;s been a flurry of recent studies and new tools that help to both demonstrate the value of a high-performing site and simplify the process of getting there.</p>
<h2 id="performance_matters">Performance matters</h2>
<p>Information on the <em>how</em> of performance has been available for awhile, but not until the last couple years have we really seen answers to the question of <em>why</em>.</p>
<p>In 2009 at Velocity&#8212;the annual performance optimization conference&#8212;there was a flurry of information released by companies that clearly demonstrated how performance effects key business objectives. Google and Bing teamed up to present results from their respective <a title="Video of Google and Bing's presentation at Velocity 2009." href="http://blip.tv/file/2279751/">experiments with page load time</a>. Bing showed that by slowing their load time down by 2 seconds, they saw a 4.3% drop in revenue per user, as well as a 1.8% decrease in the number of search queries per user.</p>
<p>Google&#8217;s results were perhaps even more startling. They found that by introducing just a 400ms delay in their pages, the number of searches per user decreased by .59%. Even more concerning was the fact that even after the delay was removed, the slower initial user experience continued to affect how their users interacted with the site. With the delay gone, those same users still had .21% less searches.</p>
<p>Performance isn&#8217;t just tied to the business objectives of search engines. Shopzilla <a title="A video of Shopzilla's Velocity 2009 talk." href="http://blip.tv/file/2290648">presented information</a> detailing how they were able to speed up their site from 4&#8211;6 seconds to 1.5 seconds per page. The results were impressive. They saw their conversion rate increase by 7&#8211;12% and their page views increased by 25%.</p>
<p>In April of this year, Mozilla performed just a couple of simple performance techniques and <a href="http://blog.mozilla.com/metrics/2010/04/05/firefox-page-load-speed-%E2%80%93-part-ii/">shaved 2.2 seconds</a> off their average page load time. This boost in performance increased their download conversions by 15.4%. Based on their daily traffic, they estimated that this increase translated to an astonishing 10.28 million additional downloads per year.</p>
<p>Buoyed by these studies, Google recently announced that they will be <a title="Google's announcement regarding considering performance in their search engine rankings." href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">taking page load time into consideration</a> when ranking sites. While it&#8217;s not yet one of the primary considerations, a high performing site of otherwise equal or similar ranking as a lower performing site will benefit from a bump in their ranking.</p>
<p>With performance contributing to revenue, frequency and depth of interaction, conversion rates and search engine optimization, it becomes crystal clear that performance optimization is not only important but that it should be a primary consideration.</p>
<h2 id="you_can_have_your_cake_and_eat_it_too">You can have your cake and eat it too</h2>
<p>Of course, performance is not all that matters. (If it was, we&#8217;d all have sites that look like Jakob Nielsen&#8217;s.) <a href="http://www.alistapart.com/articles/indefenseofeyecandy">Eye candy</a>, time and energy are all critical too. That&#8217;s why it&#8217;s important to note that there are many techniques you can use to improve the performance of your site without affecting the design at all. In most cases, you can do so using tools that greatly simplify the process and reduce the time investment required.</p>
<p>Improving page load time primarily boils down to two concerns:</p>
<ol>
<li>reducing page weight;</li>
<li>and reducing HTTP requests.</li>
</ol>
<h3 id="reducing_page_weight">Reducing page weight</h3>
<p>Reducing page weight is really a lot simpler than you might think. For images, take the time to optimize them by hand using your favorite graphics program. You&#8217;ll be amazed by how much smaller you can make them without any noticeable degradation in quality.</p>
<p>If your images have already been produced, you can use a couple of different tools to reduce the size simply and quickly. One such tool is <a href="http://www.smushit.com/ysmush.it/">Smushit.com</a>. Smush.It lets you upload graphics which it will then return to you optimized, without any loss in quality. If an app is more your style, <a href="http://imageoptim.pornel.net/">ImageOptim</a> is a very powerful app for Macs that wraps up the power of several different image optimization tools in an easy drag-and-drop interface.</p>
<p>For CSS and Javascript, run your code through a minimization tool like <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a> or <a href="http://www.crockford.com/javascript/jsmin.html">JSMin</a>, both of which can be found online. These tools will remove unnecessary whitespace and comments from your files, decreasing the file size. YUI Compressor will take it a step further and substitute shorter variable and function names for the longer ones in your core file, resulting in even more savings. Again, if an app is more your style, Stoyan Stefanov&#8217;s <abbr title="One-click Minifier Gadget"><a href="http://www.phpied.com/omg-initial-checkin/">OMG</a></abbr> will automatically minimize and save your CSS and Javascript files.</p>
<h3 id="reducing_http_requests">Reducing HTTP requests</h3>
<p>To reduce the number of HTTP requests, you can again use a tool like the <a href="http://yui.2clics.net/">online wrapper for YUI Compressor</a>. The online tool gives you the option to upload several files, which it will then combine into one.</p>
<p>In addition to being a good idea in general, making use of progressive enhancement with CSS3 will help with the performance of your site. Using CSS3 for things like gradients, drop shadows and rounded corners can allow you to significantly reduce the number of images included on a page. Doing so will not only reduce the number of HTTP requests, but also reduce your page weight.</p>
<p>Use CSS sprites where applicable. They can be a little tedious to create and maintain, so consider using a tool like the <a href="http://spriteme.org/">SpriteMe bookmarklet</a>. SpriteMe will search through your CSS to find references to images and recommend which of them you can combine into one sprite. It will not only create the sprite for you, but it will also generate the new CSS for you to place into your stylesheet.</p>
<p>If sprites aren&#8217;t your cup of tea, then use Data URI&#8217;s. Like sprites, they can be tricky to efficiently maintain, but again, someone has done some of the heavy lifting for us. <a href="http://github.com/nzakas/cssembed/wiki">CSSEmbed</a>, created by Nicholas Zakas, is a great command line tool for parsing CSS and generating Data URIs where appropriate.</p>
<h3 id="server_side_optimizations">Server side optimizations</h3>
<p>You can reap great benefits from some basic optimizations in your .htaccess file as well. Enabling gzip compression for not only html, but also stylesheets and scripts, can greatly reduce the size of your files, typically <a title="Yahoo! article on gzipping components." href="http://developer.yahoo.net/blog/archives/2007/07/high_performanc_3.html">by about 70%</a>. In fact, you can&#8212;and should&#8212;gzip any textual content that is requested on the server. It&#8217;s not necessary to enable gzipping for files like images or PDFs, as you will not notice any improvement in size. In fact, you may see the size of those files actually <em>increase</em> if you try to gzip them.</p>
<p>You should also set a far future Expires header. The Expires header is used by the server to tell the browser how long a component can be cached for. While this technique doesn&#8217;t do anything for first time visitors, applying a far future Expires header to your images, stylesheets and scripts will greatly reduce the number of HTTP requests for return visits.</p>
<p>Depending on your role and familiarity with server side technologies, you might feel a bit uncomfortable making significant changes to your .htaccess file. Thankfully someone has already done the heavy lifting for us. There&#8217;s actually an <a href="http://github.com/sergeychernyshev/.htaccess">.htaccess file already configured</a> with all of these settings that you can just download and drop into place on your server.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Performance matters. More and more studies are confirming that it&#8217;s tied to the success of major business objectives. With Google now taking page performance into consideration in their rankings, it can no longer be ignored. Users want sites that are fast. We can give them those, without having to reduce the quality and effectiveness of our designs.</p>
<p>If you perform these basic optimization techniques, you&#8217;ll considerably improve the performance of your site and you&#8217;ll do so without having to sacrifice your design at all. In fact, you can implement all 35 of the <a href="http://developer.yahoo.com/performance/">best practices for performance</a> as recommended by Yahoo! without any noticeable difference in your design.</p>
<p>If you also make use of the plethora of freely available tools to simplify each step, you&#8217;ll find you don&#8217;t have to spend a lot of time to notice a significant improvement in your page load time. Of course, if you&#8217;re using a build tool the best solution would be to grab the command line versions of these tools and automate them, but that&#8217;s a discussion for another article.</p>
<p>It&#8217;s time we stop making excuses and start giving performance the respect it deserves and our users the faster experience they want.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/10/performance-mythbusters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick Optimization Using Webgrind</title>
		<link>http://timkadlec.com/2010/08/quick-optimization-using-webgrind/</link>
		<comments>http://timkadlec.com/2010/08/quick-optimization-using-webgrind/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 13:23:48 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=664</guid>
		<description><![CDATA[I was recently working on a site whose code I was inheriting and the pages took much longer to process than I would&#8217;ve liked. Caching helped, but I wanted to get to the underlying issue so I fired up Webgrind to see if I could trace the problem. Webgrind is a freely available PHP profiling [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently working on a site whose code I was inheriting and the pages took much longer to process than I would&#8217;ve liked. Caching helped, but I wanted to get to the underlying issue so I fired up Webgrind to see if I could trace the problem.</p>
<p><a href="http://code.google.com/p/webgrind/">Webgrind</a> is a freely available PHP profiling frontend that sits on top of XDebug. Using it, you can see how many times different functions are called and find what functions called them. You can also quickly see the inclusive cost (time spent inside a function plus calls to other functions) and self cost of each function.</p>
<p>Viewing the logs for the last page load, I could see that mysql_query was called a whopping 52 times and accounted for 84.93% of the processing time (which was at an unacceptable ~3.1ms).</p>
<p>Using the Webgrind frontend, I was able to trace back 23 of those calls to one function. In turn, this function was called by one other function 17 times. I decided to focus there first.</p>
<p>Again, with the help of Webgrind, I could see that this function was called several times, in  separate files, for each page. The function produced the same results each time it was called.</p>
<p>The quick and simple fix, then, was to use a property to cache the results of that function call. So the first time it was called, it would process completely and run the necessary queries. The next time it was called, it would check it&#8217;s cache property to see if a value existed for the parameter being passed. If the value did exist &#8211; it would return that value.</p>
<p>This simple optimization immediately brought the total queries down from 52 to 36. They still accounted for 74% of the processing time, but that time had dropped dramatically from 3.1ms to ~2ms.</p>
<p>36 queries was still more than I wanted. A similar function to the one I had just optimized was responsible (both indirectly and directly) for 25 of the remaining 36 queries, so I thought I&#8217;d take a look there next.</p>
<p>Looking at the source, I could see that while the function asked for a boolean parameter to indicate if it should run certain queries, it never actually checked the value of that parameter. So no matter what, it was running all the queries, all the time. Fixing that error brought the total query count down from 36 to 16 and the total time to process the page was now ~1ms.</p>
<p>As a surprising bonus, there were no locations in the code that I had to change now that the function had been corrected. People hadn&#8217;t been expecting to get those extra values in their return object, so they never tried to use them unless they had passed a true value in for that parameter.</p>
<p>All in all I was able to take the query count down from 52 to 16 and the processing time from ~3.1ms to ~1ms. There&#8217;s more room for optimization, but this is certainly not a bad start for about 45 minutes of work.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/08/quick-optimization-using-webgrind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Toolbelt: CSSEmbed</title>
		<link>http://timkadlec.com/2010/07/performance-toolbelt-css-embed/</link>
		<comments>http://timkadlec.com/2010/07/performance-toolbelt-css-embed/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 01:30:29 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=576</guid>
		<description><![CDATA[One of the biggest keys to improving the load time of your site is minimizing the number of HTTP requests. There&#8217;s a lot of overhead involved with each request, and many requests can very quickly slow down your site. One great way to eliminate extra requests is to use data URIs instead of images. If [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest keys to improving the load time of your site is minimizing the number of HTTP requests. There&#8217;s a lot of overhead involved with each request, and many requests can very quickly slow down your site. One great way to eliminate extra requests is to use data URIs instead of images. If you want the nitty-gritty on what data URIs are, and how to use them, there are a few excellent posts by <a href="http://www.phpied.com/data-urls-what-are-they-and-how-to-use/">Stoyan Stefanov</a> and <a href="http://www.nczonline.net/blog/2009/10/27/data-uris-explained/">Nicholas Zakas</a> that walk you through the details.</p>
<p>Data URIs can be tricky to implement efficiently however. Since they are a Base64-encoded representation of an image, there is a built-in level of obfuscation that can make manual maintenance tedious. Thankfully, Nicholas put together a command line tool called CSSEmbed which takes the pain out of using them.</p>
<p>CSSEmbed is a very straightforward tool that parses a stylesheet and converts all references of images to their data URI equivalents. Installation is as simple as <a href="http://wiki.github.com/nzakas/cssembed/">downloading the .jar file</a> and placing it where you&#8217;d like. Then you use a simple command specifying any options, the file to output to, and the file to parse, like so:</p>
<p><code>java -jar cssembed.jar -o styles_uri.css styles.css</code></p>
<p>Since versions of Internet Explorer prior to IE8 don&#8217;t support data URIs, you have to use MHTML as a workaround (again, Stoyan has an <a href="http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/">excellent post</a> with more info). The command for that is very similar — you just need to make sure to declare a &#8220;root&#8221; (for example, I&#8217;d use http://timkadlec.com as my root for this site) which CSSEmbed will use in the MHTML.</p>
<p><code>java -jar cssembed.jar -o styles_mhtml.css styles.css --mhtml --mhtmlroot http://timkadlec.com</code></p>
<p>Right now, to my knowledge, you can&#8217;t parse an entire directory of CSS files, but that&#8217;s about the only thing I can think of that I&#8217;d like to see added. It&#8217;s a great tool to use during an automated build to really simplify the process of using data URIs and I definitely encourage you to go download it and give it a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/07/performance-toolbelt-css-embed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Performance Toolbelt: Page Speed</title>
		<link>http://timkadlec.com/2010/05/performance-toolbelt-page-speed/</link>
		<comments>http://timkadlec.com/2010/05/performance-toolbelt-page-speed/#comments</comments>
		<pubDate>Wed, 12 May 2010 02:53:03 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=395</guid>
		<description><![CDATA[Like it's older brother YSlow, Page Speed, released by Google in in mid-2009, is primarily a tool to audit and analyze the performance of your site. However a closer looks shows that there is in fact a lot more that Page Speed can do.]]></description>
			<content:encoded><![CDATA[<p>Like it&#8217;s older brother YSlow, <a title="Page Speed" href="http://code.google.com/speed/page-speed/">Page Speed</a>, released by Google in in mid-2009, is primarily a tool to audit and analyze the performance of your site. However a closer looks shows that there is in fact a lot more that Page Speed can do.</p>
<h2>What Does It Test</h2>
<p>Page Speed analyzes the performance of a page based on a set of 26 rules (as of version 1.7) that Google has documented. Each rule is given a priority code based on how great the potential impact would be on the page load time. Once Page Speed has determined which rules are broken, it gives the page a score between 0 and 100, which can be exported in JSON format, or sent straight to <a href="http://www.showslow.com/">ShowSlow.com</a> &#8211; a tool for recording YSlow and Page Speed scores over time.<span id="more-395"></span></p>
<p>The rules range from common rules like optimize your images, to lesser known techniques like defining a character set early. A complete list of the rules Page Speed checks for is below:</p>
<ol class="reg">
<li>Combine external CSS</li>
<li>Minimize DNS lookups</li>
<li>Leverage browser caching</li>
<li>Remove unused CSS</li>
<li>Leverage proxy caching</li>
<li>Minify CSS</li>
<li>Minify HTML</li>
<li>Minify Javascript</li>
<li>Specify image dimensions</li>
<li>Serve static content from a cookieless domain</li>
<li>Use efficient CSS selectors</li>
<li>Avoid bad requests</li>
<li>Combine external JavaScript</li>
<li>Enable compression</li>
<li>Minimize redirects</li>
<li>Minimize request size</li>
<li>Optimize images</li>
<li>Optimize the order of styles and scripts</li>
<li>Put CSS in the document head</li>
<li>Serve resources from a consistent URL</li>
<li>Serve scaled images</li>
<li>Specify a character set early</li>
<li>Avoid CSS expressions</li>
<li>Defer loading of JavaScript</li>
<li>Parallelize downloads across hostnames</li>
<li>Specify a cache validator</li>
</ol>
<h2>What Else Can It Do</h2>
<p>Like I said, while auditing may be the most well known feature of Page Speed, it is far from being the extent of its capabilities. In addition to performing a basic audit of your page, Page Speed automatically optimizes the Javascript files, CSS files, and images that it finds on the page, and saves them to a folder on your computer (which you can specify). It also has the ability to profile deferred Javascript files &#8211; something it does not do by default.</p>
<p>Perhaps the most fun though comes when you use the Page Speed Activity panel. At it&#8217;s most basic usage, the activity panel lets you record a timeline of all the browser activities, including both network activity and Javascript processing, that take place during the time you choose to record. That means that you get detail like how much time was spent connecting to the server, and how much time was spent executing the Javascript.</p>
<p>The activity panel also allows you to see a list of all the Javascript functions that were instantiated, but not called, during the recording period. This information could help you determine what portions of your code are not necessary immediately so that you can choose to load them later, allowing you to further improve your load time. You can also record &#8220;paint snapshots&#8221; in the activity panel which highlight each element in a page as it is rendered.</p>
<p>While the advanced features offered by the activity panel are very useful, it&#8217;s important to keep in mind that they do slow down the Page Speed plugin a little. Since they add a little bit more overhead, the timeline will not be 100% accurate and will serve you better as a relative reference than an exact approximation of the time it takes your page to load.</p>
<h2>It&#8217;s Open Source Too!</h2>
<p>Just recently, the <a href="http://code.google.com/p/page-speed/wiki/DownloadPageSpeed?tm=2">Page Speed SDK</a> was released as open source. Already, Steve Souders has demonstrated the usefulness of this by building <a href="http://www.stevesouders.com/blog/2010/05/01/har-to-page-speed/">HAR to Page Speed</a> &#8211; a tool that will apply the Page Speed rules to a HAR (HTTP Archive specification &#8211; a format gaining popularity) file you upload.</p>
<p>By opening the SDK up to open source, the potential is there for developers to build cross-platform tools that would allow people to analyze the performance of their site according to the Page Speed rules, regardless of the browser in use. It&#8217;s going to be exciting to see what other tools get built around the SDK as it continues to evolve.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/05/performance-toolbelt-page-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance and Beauty</title>
		<link>http://timkadlec.com/2010/04/performance-and-beauty/</link>
		<comments>http://timkadlec.com/2010/04/performance-and-beauty/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 01:57:23 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=345</guid>
		<description><![CDATA[Google recently announced that how quickly a site loads will officially factor into their search algorithm. This seems to have caused a little bit of panic amongst some people in the web community.]]></description>
			<content:encoded><![CDATA[<p>By now I&#8217;m sure that most of you have heard about the <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">recent announcement</a> by Google that speed is officially a factor in their rankings. This seems to have caused a little bit of panic amongst some people in the web community.</p>
<p>One web guru who you may have heard of, Jeffrey Zeldman, posted an <a href="http://www.zeldman.com/2010/04/11/of-google-and-page-speed/">article</a> on Sunday wherein he describes the choice he feels designers are now faced with:</p>
<blockquote><p>So now we face a dilemma. As we continue to seduce viewers via large, multiple background images, image replacement, web fonts or sIFR, and so on, we may find our beautiful sites losing page rank.</p></blockquote>
<p>It&#8217;s a fair enough point to make  - sometimes a designer will need to make a decision between additional aesthetic effects and improved performance (but not that often). What followed in the comments was disturbing though &#8211; many people were actually viewing Google&#8217;s move as a negative thing and seemed to be very worried about it&#8217;s effects.  Some felt Google was simply abusing their power, others believed they&#8217;d have to sacrifice good design in order to receive a decent ranking. The situation, I think, needs a little diffusing.<span id="more-345"></span></p>
<h2>Deep Breaths People</h2>
<p>First, let&#8217;s remember that Google themselves have said that this addition to their algorithm affects less than 1% of their search queries. That means that while it is a factor, it is certainly not the most important one. It also means that while Google wants to display sites that perform well, their standards are probably not that high. If they were, there&#8217;d be a lot more sites being penalized in the rankings.</p>
<p>Secondly, this is a great move by Google and is fantastic news for users. Study after study has demonstrated that users really care about how well a site performs. It&#8217;s been shown that performance has an effect on bounce rate, purchase amounts, queries per user, credibility and more. If Google really cares about presenting their users with the best content, then this was a great demonstration of that belief.</p>
<h2>You Can Have Your Cake and Eat It Too</h2>
<p>Finally, there&#8217;s no need to panic &#8211; a site can be beautiful and still perform very well. For an example, let&#8217;s look at Happy Cog&#8217;s own <a title="visitphilly.com" href="http://www.visitphilly.com/">visitphilly.com</a>, both because it is a beautiful site, and because this conversation was started on Zeldman&#8217;s blog.</p>
<p>A quick look lets us identify some easy improvements. For one, there are 47 CSS background images. A quick run through <a title="SpriteMe" href="http://spriteme.org/">SpriteMe</a> trims that number down to 15.</p>
<p>There are also 7 scripts being called, 3 of which are unminified. At least a few of the seven could be concatenated to reduce some more requests and running the 3 unminified scripts through a compressor shaves a whopping 54% percent off their combined size. Finally, by running the images on the home page through <a title="Smush.It" href="http://smush.it/">Smush.It</a>, we eliminate another 133KB of baggage.</p>
<p>When you add those fixes together, the performance of the site would be dramatically improved, and the visual experience would not be diminished at all. It would be indistinguishable from the unoptimized version in every way, except that it would load significantly quicker.</p>
<p>So in summary, performance and beauty are not mutually exclusive. By taking performance into consideration, Google is not making the web a difficult place for designers; they&#8217;re simply making the web a more usable and less frustrating place for users.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/04/performance-and-beauty/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Performance Toolbelt: SpriteMe</title>
		<link>http://timkadlec.com/2010/03/performance-toolbelt-spriteme/</link>
		<comments>http://timkadlec.com/2010/03/performance-toolbelt-spriteme/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 01:22:44 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=289</guid>
		<description><![CDATA[Having a lot of images in a page can be very costly. Each image requires an HTTP request, and each HTTP request comes with plenty of overhead. SpriteMe is a quick and easy way to generate sprites in an existing site.]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in a <a href="http://timkadlec.com/2010/02/performance-optimization-made-quick-and-simple/">prior post</a>, there are a lot of really good tools available to developers to aid in making performance optimization quick and easy. I&#8217;ve decided to highlight some of my favorite tools that I&#8217;ve come across and thought I&#8217;d kick things off with <a href="http://souders.org/">Steve Souders</a> excellent <a href="http://spriteme.org">SpriteMe</a> bookmarklet.</p>
<p>Having a lot of images in a page can be very costly. Each image requires an HTTP request, and each HTTP request comes with <a href="http://www.phpied.com/reducing-the-number-of-page-components/">plenty of overhead</a>. I&#8217;ve seen pages with 20+ icons, each requiring their own request &#8211; that&#8217;s a serious hinderance to performance.<span id="more-289"></span></p>
<p>A way of combatting the issue is to use sprites. For the uninitiated, an image sprite is simply one big image that includes many smaller images. This allows you to make one HTTP request, and using CSS, still make use of a variety of different images. If you plan ahead and do this while initially building the site, it&#8217;s rather simple to do. How do you quickly implement this strategy in an existing site though?</p>
<p>That&#8217;s where SpriteMe comes in. Steve Souders wrote a handy bookmarklet that looks through the images on a given page and identifies those that could potentially be combined into a sprite. At that point, it gives you a simple drag and drop interface with which you can add or remove items from a sprite. Once you&#8217;ve determined which images you&#8217;d like to combine, you can click &#8220;make sprite&#8221; and the bookmarklet will automatically create the image sprite for you, inject it into the page, and show you the CSS you&#8217;ll need to add.</p>
<p>From there it&#8217;s as simple as downloading the image and copying the CSS the tool provides into your stylesheet (I believe the ability to export the CSS is being worked on). On one recent project, I used SpriteMe to create a sprite from ~25 images that were being used in the site&#8217;s navigation in about 15 minutes of work. The only additional step I took was to run the generated sprite through OptiPng to shave some filesize off (I&#8217;ll talk about OptiPng in another post).</p>
<p>So what are the downsides? Not too much. I&#8217;d love to see it do some optimization on the sprites it produces &#8211; in the example I gave above, OptiPng shaved ~40% off the file size off. I&#8217;d also be willing to bet that the tool produces a bit more whitespace than is optimal or necessary in it&#8217;s sprites resulting in more <a href="http://blog.vlad1.com/2009/06/22/to-sprite-or-not-to-sprite/">memory usage</a>. To be fair, I haven&#8217;t tried to remove some of that excess whitespace to determine how big of a deal it really is.</p>
<p>All things considered, these are minor issues. I can easily run an image optimization tool on the produced sprite to fix that up, and it&#8217;s not like there&#8217;s THAT much whitespace &#8211; just probably a bit more than needed. These are, in my opinion, minor tradeoffs for the incredible convenience this tool provides.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/03/performance-toolbelt-spriteme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Optimization Made Quick and Simple</title>
		<link>http://timkadlec.com/2010/02/performance-optimization-made-quick-and-simple/</link>
		<comments>http://timkadlec.com/2010/02/performance-optimization-made-quick-and-simple/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 08:00:23 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://timkadlec.com/?p=236</guid>
		<description><![CDATA[Optimizing your site's performance doesn't have to be very difficult. Make use of the tools available to you, and it's downright scary how quickly you can speed up a site.]]></description>
			<content:encoded><![CDATA[<p>Optimizing your site&#8217;s performance doesn&#8217;t have to be very difficult. Take this site for example. Typically, I take care of optimization as part of the build process. However, for the sake of demonstration, I thought this time around I&#8217;d take care of each step by itself, using freely available tools where applicable.</p>
<p>First off was setting expires tags and turning gzipping on. Since I&#8217;ve done this in too many .htaccess files to count, this was simply a copy/paste job with very little tweaking necessary.<span id="more-236"></span></p>
<p>Then, I decided to optimize the images (what few there are). I ran <a href="http://developer.yahoo.com/yslow/smushit/">Smush.It</a> from the <a href="http://developer.yahoo.com/yslow/">YSlow</a> tool in Firefox. That compressed the images which I then downloaded to my computer and then promptly pushed right back up to the server. It took me 5, maybe 10 minutes and it cut the image size by about 33% total.</p>
<p>The icons for the RSS, Twitter and LinkedIn links in the footer were separate images &#8211; each requiring its own HTTP request. By using the <a href="http://spriteme.org/">SpriteMe</a> bookmarklet, I was able to generate a new sprite and the necessary CSS in a few minutes and trim those 3 HTTP requests down into one. I also ran <a href="http://optipng.sourceforge.net/">OptiPng</a> from the terminal window on my Mac on the new sprited image to shave off about 40% of the size.</p>
<p>I then minimized the CSS and Javascript (what little I was using) using <a href="http://www.phpied.com/omg-initial-checkin/">OMG</a>, which shaved ~30% off the file size of each.</p>
<p>Without any of these optimizations, my YSlow grade was a C and my page size was about 150K. After the 1/2 hour investment (if that&#8230;I&#8217;m being generous here) my YSlow grade came in at an A with a page size around 80K. Not bad for such little work.</p>
<p>There&#8217;s much more I can, and will, do here (caching, data-uri&#8217;s, etc.) but the moral of the story is that not optimizing your sites because it takes too long is just no longer an argument you can use. Make use of the tools available to you, and it&#8217;s downright scary how quickly you can speed up a site.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2010/02/performance-optimization-made-quick-and-simple/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.828 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-17 06:22:41 -->

