<?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: There&#8217;s Lazy Loading, And Then There&#8217;s Lazy Coding</title>
	<atom:link href="http://davybrion.com/blog/2009/11/theres-lazy-loading-and-then-theres-lazy-coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2009/11/theres-lazy-loading-and-then-theres-lazy-coding/</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: Biswanath</title>
		<link>http://davybrion.com/blog/2009/11/theres-lazy-loading-and-then-theres-lazy-coding/comment-page-1/#comment-23025</link>
		<dc:creator>Biswanath</dc:creator>
		<pubDate>Mon, 23 Nov 2009 06:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1905#comment-23025</guid>
		<description>Totally true.

We were working with some hierarchical data and we started with eager loading for all the levels. As it turned out most of the cases we did not needed all the data we were loading.

Then we changed everything to the lazy load, but as it turns out sometimes we were firing two many queries for the some of the lower level of hierarchies. 

Then finally we have to go for a combination of lazy with eager as you have mentioned to hit the sweet spot.</description>
		<content:encoded><![CDATA[<p>Totally true.</p>
<p>We were working with some hierarchical data and we started with eager loading for all the levels. As it turned out most of the cases we did not needed all the data we were loading.</p>
<p>Then we changed everything to the lazy load, but as it turns out sometimes we were firing two many queries for the some of the lower level of hierarchies. </p>
<p>Then finally we have to go for a combination of lazy with eager as you have mentioned to hit the sweet spot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Tenhundfeld</title>
		<link>http://davybrion.com/blog/2009/11/theres-lazy-loading-and-then-theres-lazy-coding/comment-page-1/#comment-22990</link>
		<dc:creator>Al Tenhundfeld</dc:creator>
		<pubDate>Thu, 19 Nov 2009 16:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1905#comment-22990</guid>
		<description>If you need data, then it is your responsibility to retrieve that data &lt;strike&gt;as efficiently as you can&lt;/strike&gt; as efficiently as performance requirements dictate.

Otherwise, yes, lazy loading is a useful pattern, but like any pattern, it can be abused easily.</description>
		<content:encoded><![CDATA[<p>If you need data, then it is your responsibility to retrieve that data <strike>as efficiently as you can</strike> as efficiently as performance requirements dictate.</p>
<p>Otherwise, yes, lazy loading is a useful pattern, but like any pattern, it can be abused easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders Ivner</title>
		<link>http://davybrion.com/blog/2009/11/theres-lazy-loading-and-then-theres-lazy-coding/comment-page-1/#comment-22989</link>
		<dc:creator>Anders Ivner</dc:creator>
		<pubDate>Thu, 19 Nov 2009 13:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1905#comment-22989</guid>
		<description>I agree that lazy loading is not the problem, and that a lot of the perceived problem is caused by developers relying too much on it, either out of laziness (though one could argue a YAGNI or &quot;optimize later&quot; stance - leading to &quot;death by a thousand cuts&quot;) or ignorance.

But I think the root problem is that contextual span fetching is inherently a DRY violation, meaning that load spans and domain logic are defined separately, thus making them hard to maintain in sync as an application evolves.

I am thinking here of a load span being defined in the context of e.g. a particular service method. The domain logic would obviously go on the domain model classes, which we want to keep independent of any persistence concerns. When we make a change to a method on a domain class, requiring some new data, we need to understand which spans (there could be more than one) are affected and amend them as appropriate.

In the end, the only cure is measuring performance and profiling, which is something one should do anyway.

Cheers!

/Anders</description>
		<content:encoded><![CDATA[<p>I agree that lazy loading is not the problem, and that a lot of the perceived problem is caused by developers relying too much on it, either out of laziness (though one could argue a YAGNI or &#8220;optimize later&#8221; stance &#8211; leading to &#8220;death by a thousand cuts&#8221;) or ignorance.</p>
<p>But I think the root problem is that contextual span fetching is inherently a DRY violation, meaning that load spans and domain logic are defined separately, thus making them hard to maintain in sync as an application evolves.</p>
<p>I am thinking here of a load span being defined in the context of e.g. a particular service method. The domain logic would obviously go on the domain model classes, which we want to keep independent of any persistence concerns. When we make a change to a method on a domain class, requiring some new data, we need to understand which spans (there could be more than one) are affected and amend them as appropriate.</p>
<p>In the end, the only cure is measuring performance and profiling, which is something one should do anyway.</p>
<p>Cheers!</p>
<p>/Anders</p>
]]></content:encoded>
	</item>
</channel>
</rss>
