<?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>Willian Mitsuda.com &#187; Performance</title>
	<atom:link href="http://www.willianmitsuda.com/category/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.willianmitsuda.com</link>
	<description></description>
	<lastBuildDate>Sat, 18 Jul 2009 16:11:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Widgets Can Kill Your Website</title>
		<link>http://www.willianmitsuda.com/2008/05/29/widgets-can-kill-your-website/</link>
		<comments>http://www.willianmitsuda.com/2008/05/29/widgets-can-kill-your-website/#comments</comments>
		<pubDate>Thu, 29 May 2008 18:57:58 +0000</pubDate>
		<dc:creator>Willian Mitsuda</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[rec6]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.willianmitsuda.com/?p=58</guid>
		<description><![CDATA[Today, it is very common for people to embed widgets in their website, blog, etc. Usually these widgets are provided by social apps who want to promote their service by inserting their widgets in most sites, in exchange to providing some kind to benefit to the site owner, like improving visibility by using some kind [...]]]></description>
			<content:encoded><![CDATA[<p>Today, it is very common for people to embed widgets in their website, blog, etc. Usually these widgets are provided by social apps who want to promote their service by inserting their widgets in most sites, in exchange to providing some kind to benefit to the site owner, like improving visibility by using some kind of ranking, etc.</p>
<p>However, using a poor engineered service can degrade your website&#8217;s performance substantially. One real example I just faced is with the <a href="http://www.chrinvestor.com/">CHR Investor</a> website. It is a brazilian blog I read and like very much, about stock market. They put a widget from <a href="http://rec6.via6.com/">Rec6</a>, a brazilian Digg-like website. This widget is a <a href="http://digg.com/">Digg</a>-like voting widget: it shows the number of votes the article has, and a button to vote on it.</p>
<p>However, the Rec6 servers have been very slow to respond and this is degrading the blog&#8217;s performance very much. As you can see in the next screenshot, taken from <a href="http://www.getfirebug.com/">Firebug</a>, the widget is loaded from an external javascript, which takes ~9 seconds to load (actually, in my tests the response time is varying between 5 and 12 seconds)!</p>
<p><img class="alignnone size-full wp-image-59" title="Firebug screenshot" src="http://www.willianmitsuda.com/wp-content/uploads/performance-rec6-chrinvestor.png" alt="" width="497" height="514" /></p>
<p>Those who already read the excellent <a href="http://www.oreilly.com/catalog/9780596529307/">High Performance Web Sites</a> book (chapter 6, more precisely) know what this means: an external javascript blocks everything until it is entirely loaded. This can be seem clearly in the picture: only after the widget is loaded, the rest of the page is downloaded.</p>
<p>The result from the visitor point of view is also very noticeable: the beginning of the page is loaded and rendered, everything freezes for ~9 seconds (the amount of time it takes to load the javascript from Rec6), and only then the rest of the page is rendered, very quickly.</p>
<p>So, if you intend to embed some kind of external service in your website, it is important to measure if they can handle the load of thousands (millions?) of users using their service.</p>
<p>I use some services here, like Google Adsense, Google Analytics, and the Google Reader Shared Items. The Google Analytics and Google Reader are a little slow (~200-400ms), but they don&#8217;t hurt because I can move them to the end of the page. The more problematic is Adsense because it writes content in the middle of the page, so you cannot move it. But the response times (~300ms each ad) don&#8217;t hurt, and are just fine.</p>
<p>More reading:</p>
<p><a href="http://developer.yahoo.com/performance/rules.html#js_bottom">http://developer.yahoo.com/performance/rules.html#js_bottom</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.willianmitsuda.com/2008/05/29/widgets-can-kill-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

