<?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/"
		>
<channel>
	<title>Comments on: Performance Rules Of Thumb</title>
	<atom:link href="http://davybrion.com/blog/2009/02/performance-rules-of-thumb/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Thu, 29 Jul 2010 21:01:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Gregory Kornblum</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-9086</link>
		<dc:creator>Gregory Kornblum</dc:creator>
		<pubDate>Mon, 23 Feb 2009 17:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-9086</guid>
		<description>A very solid set of guidelines. Very good stuff. Trust me, I have felt the pain of not following some of them.</description>
		<content:encoded><![CDATA[<p>A very solid set of guidelines. Very good stuff. Trust me, I have felt the pain of not following some of them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alik Levin &#124; PracticeThis.com</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-9072</link>
		<dc:creator>Alik Levin &#124; PracticeThis.com</dc:creator>
		<pubDate>Mon, 23 Feb 2009 06:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-9072</guid>
		<description>Gold,
it must be on top of every developer&#039;s and architect&#039;s mind.
Good stuff, liked it</description>
		<content:encoded><![CDATA[<p>Gold,<br />
it must be on top of every developer&#8217;s and architect&#8217;s mind.<br />
Good stuff, liked it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Weekly Web Nuggets #52 : Code Monkey Labs</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-9063</link>
		<dc:creator>Weekly Web Nuggets #52 : Code Monkey Labs</dc:creator>
		<pubDate>Mon, 23 Feb 2009 03:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-9063</guid>
		<description>[...] Performance Rules of Thumb: Davy Brion shares his thoughts on performance – some high-level guidelines that encompass a majority of potential issues. [...]</description>
		<content:encoded><![CDATA[<p>[...] Performance Rules of Thumb: Davy Brion shares his thoughts on performance – some high-level guidelines that encompass a majority of potential issues. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Software Quality Digest - 2009-02-18 &#124; No bug left behind</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8945</link>
		<dc:creator>Software Quality Digest - 2009-02-18 &#124; No bug left behind</dc:creator>
		<pubDate>Wed, 18 Feb 2009 17:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8945</guid>
		<description>[...] Performance Rules Of Thumb - Some basic rules for performance optimization [...]</description>
		<content:encoded><![CDATA[<p>[...] Performance Rules Of Thumb &#8211; Some basic rules for performance optimization [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sasha Goldshtein</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8876</link>
		<dc:creator>Sasha Goldshtein</dc:creator>
		<pubDate>Tue, 17 Feb 2009 12:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8876</guid>
		<description>@Eric: Time might not seem to matter at first, and start to matter in a production scenario.  Your app might be dealing with 50 Bitmap objects at first, but due to popularity and market demands all of the sudden you have to create and destroy thousands of Bitmap objects per minute.  All of the sudden, deterministically releasing resources becomes important.

Precisely BECAUSE it is usually hard to evaluate the factors that affect unmanaged resource consumption, the rule of thumb should be to explicitly dispose such resources.</description>
		<content:encoded><![CDATA[<p>@Eric: Time might not seem to matter at first, and start to matter in a production scenario.  Your app might be dealing with 50 Bitmap objects at first, but due to popularity and market demands all of the sudden you have to create and destroy thousands of Bitmap objects per minute.  All of the sudden, deterministically releasing resources becomes important.</p>
<p>Precisely BECAUSE it is usually hard to evaluate the factors that affect unmanaged resource consumption, the rule of thumb should be to explicitly dispose such resources.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8875</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Tue, 17 Feb 2009 11:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8875</guid>
		<description>@Eric

the using statement is great and all, but it&#039;s only usable within the scope of a method... if you need to hold on to an IDisposable for a longer time, you need to make sure that the containing object explicitly calls .Dispose on the IDisposable, and in fact, i would recommend that in this specific scenario, the containing object implements IDisposable as well</description>
		<content:encoded><![CDATA[<p>@Eric</p>
<p>the using statement is great and all, but it&#8217;s only usable within the scope of a method&#8230; if you need to hold on to an IDisposable for a longer time, you need to make sure that the containing object explicitly calls .Dispose on the IDisposable, and in fact, i would recommend that in this specific scenario, the containing object implements IDisposable as well</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8874</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 17 Feb 2009 11:17:45 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8874</guid>
		<description>@Sasha and @Freddy - I&#039;m aware of the implicit call on Dispose with &quot;using&quot;.  Perhaps I should have phrased things differently: &quot;Use a using statement as opposed to obj.Dispose() to explicitly delimit the lifetime of the associated unmanaged resource(s).&quot;.

@Sasha - I would say whether or not you explicitly dispose of unmanaged resources is dependent on a number of factors, including whether or not such resources are limited.  So, the time at which the resource will be cleaned up is indeterminate?  If this doesn&#039;t matter, then I don&#039;t see the problem.</description>
		<content:encoded><![CDATA[<p>@Sasha and @Freddy &#8211; I&#8217;m aware of the implicit call on Dispose with &#8220;using&#8221;.  Perhaps I should have phrased things differently: &#8220;Use a using statement as opposed to obj.Dispose() to explicitly delimit the lifetime of the associated unmanaged resource(s).&#8221;.</p>
<p>@Sasha &#8211; I would say whether or not you explicitly dispose of unmanaged resources is dependent on a number of factors, including whether or not such resources are limited.  So, the time at which the resource will be cleaned up is indeterminate?  If this doesn&#8217;t matter, then I don&#8217;t see the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freddy</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8840</link>
		<dc:creator>Freddy</dc:creator>
		<pubDate>Mon, 16 Feb 2009 16:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8840</guid>
		<description>@Eric actually, by doing 2 you are implicitly calling dispose. That is just what it does for you (on either normal execution or when an exception occurs).</description>
		<content:encoded><![CDATA[<p>@Eric actually, by doing 2 you are implicitly calling dispose. That is just what it does for you (on either normal execution or when an exception occurs).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sasha Goldshtein</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8839</link>
		<dc:creator>Sasha Goldshtein</dc:creator>
		<pubDate>Mon, 16 Feb 2009 16:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8839</guid>
		<description>@Eric, a &lt;i&gt;using&lt;/i&gt; statement calls Dispose on the object at the end of the scope.  So you&#039;re contradicting your own advice.  And anyway, it&#039;s extremely important to DO call Dispose on objects that use unmanaged resources, exactly because you DO NOT want to rely on finalization to reclaim these resources.

The GC can reclaim memory without any effort; any other kind of resource that is cleaned up (by Dispose() and/or a finalizer) requires significant effort if you don&#039;t do it explicitly.  I have seen (and blogged about) many bugs that were caused by non-deterministic finalization.</description>
		<content:encoded><![CDATA[<p>@Eric, a <i>using</i> statement calls Dispose on the object at the end of the scope.  So you&#8217;re contradicting your own advice.  And anyway, it&#8217;s extremely important to DO call Dispose on objects that use unmanaged resources, exactly because you DO NOT want to rely on finalization to reclaim these resources.</p>
<p>The GC can reclaim memory without any effort; any other kind of resource that is cleaned up (by Dispose() and/or a finalizer) requires significant effort if you don&#8217;t do it explicitly.  I have seen (and blogged about) many bugs that were caused by non-deterministic finalization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://davybrion.com/blog/2009/02/performance-rules-of-thumb/comment-page-1/#comment-8825</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Mon, 16 Feb 2009 05:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=922#comment-8825</guid>
		<description>I would elaborate on &quot;Dispose objects that need it as soon as possible&quot;.  In short, I see too much &quot;second guessing&quot; of the garbage collector.  In general (this applies .NET):

(1) Do not call obj.Dispose() but allow the GC to do the work for you---it&#039;s a finely tuned beast that alot of thought has gone into.  Yes, this even applies to objects that you *know* use unmanaged resources;
(2) When dealing with objects that you know use unmanaged resources always try to use a &quot;using&quot; statement to delimit the scope of use.

Of course (1) and (2) assumes that you&#039;ve correctly implemented the Disposable pattern on anything that you write that directly or indirectly uses unmanaged resources.  Be smart about this---I had a colleague who insisted that IDisposable be properly implemented on *all* classes that were written---that&#039;s just silly.</description>
		<content:encoded><![CDATA[<p>I would elaborate on &#8220;Dispose objects that need it as soon as possible&#8221;.  In short, I see too much &#8220;second guessing&#8221; of the garbage collector.  In general (this applies .NET):</p>
<p>(1) Do not call obj.Dispose() but allow the GC to do the work for you&#8212;it&#8217;s a finely tuned beast that alot of thought has gone into.  Yes, this even applies to objects that you *know* use unmanaged resources;<br />
(2) When dealing with objects that you know use unmanaged resources always try to use a &#8220;using&#8221; statement to delimit the scope of use.</p>
<p>Of course (1) and (2) assumes that you&#8217;ve correctly implemented the Disposable pattern on anything that you write that directly or indirectly uses unmanaged resources.  Be smart about this&#8212;I had a colleague who insisted that IDisposable be properly implemented on *all* classes that were written&#8212;that&#8217;s just silly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
