<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: &#8220;Micro&#8221; Optimizations That Matter</title>
	<atom:link href="http://www.brandonsavage.net/micro-optimizations-that-matter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brandonsavage.net/micro-optimizations-that-matter/</link>
	<description>The personal blog of Brandon Savage. Contains entries of a personal and professional nature focusing on PHP, Apple, LAMP, MySQL and Washington, DC.</description>
	<lastBuildDate>Thu, 25 Feb 2010 21:59:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniel</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1741</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 26 Oct 2009 15:33:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1741</guid>
		<description>Sage advice.  Thanks for all the tips.  I will definitely keep bookmark this one for future reference.</description>
		<content:encoded><![CDATA[<p>Sage advice.  Thanks for all the tips.  I will definitely keep bookmark this one for future reference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Savage</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1646</link>
		<dc:creator>Brandon Savage</dc:creator>
		<pubDate>Mon, 19 Oct 2009 09:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1646</guid>
		<description>Unfortunately I&#039;ve seen lots of developers leave errors in their apps. They don&#039;t error trap well enough, or they don&#039;t consider the possibilities and they end up with notices or errors. It happens more than one might think.</description>
		<content:encoded><![CDATA[<p>Unfortunately I&#8217;ve seen lots of developers leave errors in their apps. They don&#8217;t error trap well enough, or they don&#8217;t consider the possibilities and they end up with notices or errors. It happens more than one might think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LP</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1645</link>
		<dc:creator>LP</dc:creator>
		<pubDate>Mon, 19 Oct 2009 09:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1645</guid>
		<description>Ah, got it. Well, sure then, fixing errors is always a good practice, and I can&#039;t imagine developer who allows himself not fixing continuous errors in his app.</description>
		<content:encoded><![CDATA[<p>Ah, got it. Well, sure then, fixing errors is always a good practice, and I can&#8217;t imagine developer who allows himself not fixing continuous errors in his app.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Savage</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1644</link>
		<dc:creator>Brandon Savage</dc:creator>
		<pubDate>Mon, 19 Oct 2009 08:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1644</guid>
		<description>You completely missed the point here. I never suggested getting rid of error logging. I suggested getting rid of as many errors as you possibly could so that they wouldn&#039;t be logged. Not logging errors is dumb. But having known errors that you&#039;re logging because you&#039;re too lazy to fix them is even greater stupidity. Don&#039;t do that.</description>
		<content:encoded><![CDATA[<p>You completely missed the point here. I never suggested getting rid of error logging. I suggested getting rid of as many errors as you possibly could so that they wouldn&#8217;t be logged. Not logging errors is dumb. But having known errors that you&#8217;re logging because you&#8217;re too lazy to fix them is even greater stupidity. Don&#8217;t do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LP</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1642</link>
		<dc:creator>LP</dc:creator>
		<pubDate>Mon, 19 Oct 2009 08:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1642</guid>
		<description>I think eliminating error logging is bad advice. Sure, it adds some overhead, but security your app means much more then performance. You can&#039;t be 100% sure that you&#039;ve fixed all errors during development and testing, many errors show themselves only on real data, and browsing error log can be the only way to find them when your app is live.</description>
		<content:encoded><![CDATA[<p>I think eliminating error logging is bad advice. Sure, it adds some overhead, but security your app means much more then performance. You can&#8217;t be 100% sure that you&#8217;ve fixed all errors during development and testing, many errors show themselves only on real data, and browsing error log can be the only way to find them when your app is live.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zyx</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1641</link>
		<dc:creator>Zyx</dc:creator>
		<pubDate>Mon, 19 Oct 2009 07:00:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1641</guid>
		<description>I think it is worth pointing out that autoloader should be fast itself in order to get the performance boost. Basically, it must use the information stored in the class name to locate the file, and it should not perform any complex calculations on them. Another good thing is not to use include_paths, which are very slow if there are many paths (PHP must test all of them in the worst case) and the most frequently used are at the end.</description>
		<content:encoded><![CDATA[<p>I think it is worth pointing out that autoloader should be fast itself in order to get the performance boost. Basically, it must use the information stored in the class name to locate the file, and it should not perform any complex calculations on them. Another good thing is not to use include_paths, which are very slow if there are many paths (PHP must test all of them in the worst case) and the most frequently used are at the end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cocowool</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1635</link>
		<dc:creator>cocowool</dc:creator>
		<pubDate>Mon, 19 Oct 2009 03:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1635</guid>
		<description>if we use a host service from others, many optimizations have been down by the company, so i think we should focus on our architect, when we have the traffic more and more, it&#039;s time to consider optimization</description>
		<content:encoded><![CDATA[<p>if we use a host service from others, many optimizations have been down by the company, so i think we should focus on our architect, when we have the traffic more and more, it&#8217;s time to consider optimization</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomaž Muraus</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1630</link>
		<dc:creator>Tomaž Muraus</dc:creator>
		<pubDate>Sun, 18 Oct 2009 20:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1630</guid>
		<description>Most hosts use some kind of opcode caching system like APC or eAccelerator, but I don&#039;t know any shared hosting which supports memcached.

Anyway, if you have a large and popular website and you are using some cheap shared hosting, wondering if your host supports memcached should be the least of your concern.</description>
		<content:encoded><![CDATA[<p>Most hosts use some kind of opcode caching system like APC or eAccelerator, but I don&#8217;t know any shared hosting which supports memcached.</p>
<p>Anyway, if you have a large and popular website and you are using some cheap shared hosting, wondering if your host supports memcached should be the least of your concern.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Glover</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1616</link>
		<dc:creator>Jeremy Glover</dc:creator>
		<pubDate>Sat, 17 Oct 2009 22:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1616</guid>
		<description>Great post, Brandon. 

Do most web hosts support APC and memcached or do you have to go to more expensive hosts for those to be available?

While S3 isn&#039;t technically a CDN, you can still get many benefits from using it as one. As was noted earlier, it offloads the request/response process from your sever, allowing it to work on more important things. Also, the quality of S3 is so high that its response times are typically way faster than most people&#039;s severs, especially if you&#039;re using a cheap host like me. Check out how much S3 helped my website: http://www.jeremyglover.com/blog/2009/03/16/speed-up-that-cheap-website-with-cheap-amazon-s3/

Thanks again for all the pointers!</description>
		<content:encoded><![CDATA[<p>Great post, Brandon. </p>
<p>Do most web hosts support APC and memcached or do you have to go to more expensive hosts for those to be available?</p>
<p>While S3 isn&#8217;t technically a CDN, you can still get many benefits from using it as one. As was noted earlier, it offloads the request/response process from your sever, allowing it to work on more important things. Also, the quality of S3 is so high that its response times are typically way faster than most people&#8217;s severs, especially if you&#8217;re using a cheap host like me. Check out how much S3 helped my website: <a href="http://www.jeremyglover.com/blog/2009/03/16/speed-up-that-cheap-website-with-cheap-amazon-s3/" rel="nofollow">http://www.jeremyglover.com/blog/2009/03/16/speed-up-that-cheap-website-with-cheap-amazon-s3/</a></p>
<p>Thanks again for all the pointers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Folkes</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1606</link>
		<dc:creator>Samuel Folkes</dc:creator>
		<pubDate>Sat, 17 Oct 2009 02:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1606</guid>
		<description>Yet another excellent post Brandon. I&#039;m glad you wrapped the word &quot;Micro&quot; in the title in quotes because when compared to some of the &#039;optimization strategies&#039; I see floating around the web the optimizations you listed here a pretty huge. Just two points. The first is that in almost all my tests I have found autoloading to be faster than or at least as fast as multiple requires or includes using PHP 5.2+. The second is that I would add to your list that page load times can be significantly decreased if output compression is enabled, whether via output buffering (ob_start(&#039;ob_gzhandler&#039;)) or php.ini (zlib.output_compression = On)</description>
		<content:encoded><![CDATA[<p>Yet another excellent post Brandon. I&#8217;m glad you wrapped the word &#8220;Micro&#8221; in the title in quotes because when compared to some of the &#8216;optimization strategies&#8217; I see floating around the web the optimizations you listed here a pretty huge. Just two points. The first is that in almost all my tests I have found autoloading to be faster than or at least as fast as multiple requires or includes using PHP 5.2+. The second is that I would add to your list that page load times can be significantly decreased if output compression is enabled, whether via output buffering (ob_start(&#8216;ob_gzhandler&#8217;)) or php.ini (zlib.output_compression = On)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Savage</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1603</link>
		<dc:creator>Brandon Savage</dc:creator>
		<pubDate>Sat, 17 Oct 2009 00:32:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1603</guid>
		<description>Point taken. You&#039;re quite right. I think you can deliver content directly out of the S3 storage network but its not a CDN.</description>
		<content:encoded><![CDATA[<p>Point taken. You&#8217;re quite right. I think you can deliver content directly out of the S3 storage network but its not a CDN.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1601</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Fri, 16 Oct 2009 21:57:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1601</guid>
		<description>A small clarification: S3 is not a content-delivery network. It&#039;s just file storage.  Just hosting your files on S3 won&#039;t speed things up much, if at all.  

CloudFront is the name of Amazon&#039;s CDN. It requires S3, but it&#039;s a different product.</description>
		<content:encoded><![CDATA[<p>A small clarification: S3 is not a content-delivery network. It&#8217;s just file storage.  Just hosting your files on S3 won&#8217;t speed things up much, if at all.  </p>
<p>CloudFront is the name of Amazon&#8217;s CDN. It requires S3, but it&#8217;s a different product.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyorgy</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1599</link>
		<dc:creator>Gyorgy</dc:creator>
		<pubDate>Fri, 16 Oct 2009 20:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1599</guid>
		<description>Thumbs up for this post!</description>
		<content:encoded><![CDATA[<p>Thumbs up for this post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1597</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Fri, 16 Oct 2009 16:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1597</guid>
		<description>@Matthew: I&#039;ve read about those optimizations and IMHO that&#039;s why in my test scenario autoload was as fast as require_once while loading all 1000 classes. It&#039;s amazing how well it performs.

@Brandon and @Simon: I know the benefits of autoload - performance gain and ease-of-use.

My doubts are about APC opcode cache and autoloading. In this case code is loaded at runtime, on demand, so does opcode cache know how to deal with it? Maybe it does cache all code and use cache blocks (representing classes) when needed?</description>
		<content:encoded><![CDATA[<p>@Matthew: I&#8217;ve read about those optimizations and IMHO that&#8217;s why in my test scenario autoload was as fast as require_once while loading all 1000 classes. It&#8217;s amazing how well it performs.</p>
<p>@Brandon and @Simon: I know the benefits of autoload &#8211; performance gain and ease-of-use.</p>
<p>My doubts are about APC opcode cache and autoloading. In this case code is loaded at runtime, on demand, so does opcode cache know how to deal with it? Maybe it does cache all code and use cache blocks (representing classes) when needed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oscar</title>
		<link>http://www.brandonsavage.net/micro-optimizations-that-matter/#comment-1596</link>
		<dc:creator>Oscar</dc:creator>
		<pubDate>Fri, 16 Oct 2009 15:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=752#comment-1596</guid>
		<description>Related to &quot;Determine What Data Doesn’t Need To Be Real-Time&quot;, but more specifically I&#039;d recommend you move any code that depends on a network call to a corn job.  The classic example of this is using curl/include to get an RSS feed and parse it.  This should be done outside the script that handles the http request.  Store the results in cache/db  and retrieve them quickly for display on your pages.</description>
		<content:encoded><![CDATA[<p>Related to &#8220;Determine What Data Doesn’t Need To Be Real-Time&#8221;, but more specifically I&#8217;d recommend you move any code that depends on a network call to a corn job.  The classic example of this is using curl/include to get an RSS feed and parse it.  This should be done outside the script that handles the http request.  Store the results in cache/db  and retrieve them quickly for display on your pages.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
