<?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: Of Course NHibernate Is Slow When You Use It Incorrectly</title> <atom:link href="http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/</link> <description>inquisitive: adjective. given to inquiry, research, or asking questions; eager for knowledge; intellectually curious</description> <lastBuildDate>Sun, 20 May 2012 21:55:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: 最想要的实体框架功能 &#124; chainding</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-104700</link> <dc:creator>最想要的实体框架功能 &#124; chainding</dc:creator> <pubDate>Mon, 13 Feb 2012 03:20:37 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-104700</guid> <description>[...] 对于业务线（LOB，即Line of Business）应用程序而言，批量创建/更新/删除是一关键功能，而在大多数对象关系映射（ORM）工具中大概都没有此功能。像DBase和PowerBuilder等一些早期编程语言在几十年前已有此种能力。一些人甚至提出，对象关系映射（ORM）工具不适用于大容量事务，而更适合于在线交易处理（OLTP）及非批处理操作。 [...]</description> <content:encoded><![CDATA[<p>[...] 对于业务线（LOB，即Line of Business）应用程序而言，批量创建/更新/删除是一关键功能，而在大多数对象关系映射（ORM）工具中大概都没有此功能。像DBase和PowerBuilder等一些早期编程语言在几十年前已有此种能力。一些人甚至提出，对象关系映射（ORM）工具不适用于大容量事务，而更适合于在线交易处理（OLTP）及非批处理操作。 [...]</p> ]]></content:encoded> </item> <item><title>By: Dato1100</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-98271</link> <dc:creator>Dato1100</dc:creator> <pubDate>Sun, 27 Feb 2011 06:16:00 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-98271</guid> <description>Great post, I just made a little write &quot;benchmark&quot; and was curious why NHibernate was hundred times slower than EF. After simulating a more OLTP scenario (that is, disposing ISession everytime a transaction commits) I&#039;ve got better performance than EF :)</description> <content:encoded><![CDATA[<p>Great post, I just made a little write &#8220;benchmark&#8221; and was curious why NHibernate was hundred times slower than EF. After simulating a more OLTP scenario (that is, disposing ISession everytime a transaction commits) I&#8217;ve got better performance than EF <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Larry Liston</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-36025</link> <dc:creator>Larry Liston</dc:creator> <pubDate>Mon, 12 Apr 2010 17:07:18 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-36025</guid> <description>I would have to agree withe Bart regarding the &quot;unit of work&quot; statement. The application should determine this based on requirements and environment. It would seem that if performance was the #1 concern, an ORM (and it associated overhead) might not be advisable anyway. Regardless, loading a collection, dirtying them up, and shoving them back in the database is  a real world scenario and a useful metric as long as the playing field is level.</description> <content:encoded><![CDATA[<p>I would have to agree withe Bart regarding the &#8220;unit of work&#8221; statement. The application should determine this based on requirements and environment. It would seem that if performance was the #1 concern, an ORM (and it associated overhead) might not be advisable anyway. Regardless, loading a collection, dirtying them up, and shoving them back in the database is  a real world scenario and a useful metric as long as the playing field is level.</p> ]]></content:encoded> </item> <item><title>By: Tuna toksoz</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22299</link> <dc:creator>Tuna toksoz</dc:creator> <pubDate>Fri, 21 Aug 2009 07:49:29 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22299</guid> <description>Bart, I have enabled batching in NH too, and ensured the ID gen is not one of the bad ones. NH performed better. I am interested in your code.</description> <content:encoded><![CDATA[<p>Bart, I have enabled batching in NH too, and ensured the ID gen is not one of the bad ones. NH performed better. I am interested in your code.</p> ]]></content:encoded> </item> <item><title>By: Bart Czernicki</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22298</link> <dc:creator>Bart Czernicki</dc:creator> <pubDate>Fri, 21 Aug 2009 03:02:05 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22298</guid> <description>@Davy,Not sure you can speak in absolutes that a &quot;unit of work&quot; should be small.  For example, in a Silverlight RIA application when there is a series of changes done to the objects on the client the changes are &quot;committed&quot; in large transaction batch involving many entities.  I found that ADO.NET Data Services with EF performs better in these scenarios than nHibernate.Depending on your application this could easily involve a ton of entities that require multiple changes.  With EF even hundreds of changes batched performs really fast.  If you think about hundreds of changed entities is not hard to achieve (15-20 related tables with 5 new &quot;somethings&quot; fully created).</description> <content:encoded><![CDATA[<p>@Davy,</p><p>Not sure you can speak in absolutes that a &#8220;unit of work&#8221; should be small.  For example, in a Silverlight RIA application when there is a series of changes done to the objects on the client the changes are &#8220;committed&#8221; in large transaction batch involving many entities.  I found that ADO.NET Data Services with EF performs better in these scenarios than nHibernate.</p><p>Depending on your application this could easily involve a ton of entities that require multiple changes.  With EF even hundreds of changes batched performs really fast.  If you think about hundreds of changed entities is not hard to achieve (15-20 related tables with 5 new &#8220;somethings&#8221; fully created).</p> ]]></content:encoded> </item> <item><title>By: NHibernate Talk 8/20/09 - Travis.Net.Blog</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22297</link> <dc:creator>NHibernate Talk 8/20/09 - Travis.Net.Blog</dc:creator> <pubDate>Thu, 20 Aug 2009 22:48:54 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22297</guid> <description>[...] custom data layer to Nhibernate, choices that have to be made when choosing NH for your data layer.NHibernate Slow? Of course when used wrong.  Published Thursday, August 20, 2009 4:30 PM by mxmissile Filed under: [...]</description> <content:encoded><![CDATA[<p>[...] custom data layer to Nhibernate, choices that have to be made when choosing NH for your data layer.NHibernate Slow? Of course when used wrong.  Published Thursday, August 20, 2009 4:30 PM by mxmissile Filed under: [...]</p> ]]></content:encoded> </item> <item><title>By: Tuna toksoz</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22296</link> <dc:creator>Tuna toksoz</dc:creator> <pubDate>Thu, 20 Aug 2009 21:41:15 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22296</guid> <description>@Davy
I chatted with Gergely and fixed the issue (other than not being a real world case).
We changed FlushMode to FlushMode.Never and removed a bunch of .Flush() in record data test and enabled batching. .SaveChanges() is doing batching, so should NHibernate.Results? Nh wins :)</description> <content:encoded><![CDATA[<p>@Davy<br
/> I chatted with Gergely and fixed the issue (other than not being a real world case).<br
/> We changed FlushMode to FlushMode.Never and removed a bunch of .Flush() in record data test and enabled batching. .SaveChanges() is doing batching, so should NHibernate.</p><p>Results? Nh wins <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22295</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 20 Aug 2009 20:13:47 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22295</guid> <description>@Gergelyas i mentioned in the post, the whole problem with benchmarks like yours (and the ones we&#039;ve seen lately) is that they only test performance in non-realistic usage scenarios, it doesn&#039;t really matter if it is fair to all of the compared ORM&#039;s... if it&#039;s not tested in typical ORM usage, then it simply isn&#039;t relevant. Performance of ORM&#039;s can only be measured in a meaningful way when they are compared in real-world situations.  Performance differences in other scenarios are just not trustworthy.And just for the record, if NHibernate would&#039;ve beaten Entity Framework in most or all of the tests, i would still feel the same way about the results. They simply aren&#039;t valid.</description> <content:encoded><![CDATA[<p>@Gergely</p><p>as i mentioned in the post, the whole problem with benchmarks like yours (and the ones we&#8217;ve seen lately) is that they only test performance in non-realistic usage scenarios, it doesn&#8217;t really matter if it is fair to all of the compared ORM&#8217;s&#8230; if it&#8217;s not tested in typical ORM usage, then it simply isn&#8217;t relevant. Performance of ORM&#8217;s can only be measured in a meaningful way when they are compared in real-world situations.  Performance differences in other scenarios are just not trustworthy.</p><p>And just for the record, if NHibernate would&#8217;ve beaten Entity Framework in most or all of the tests, i would still feel the same way about the results. They simply aren&#8217;t valid.</p> ]]></content:encoded> </item> <item><title>By: Arjan&#8217;s World &#187; LINKBLOG for August 20, 2009</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22294</link> <dc:creator>Arjan&#8217;s World &#187; LINKBLOG for August 20, 2009</dc:creator> <pubDate>Thu, 20 Aug 2009 15:58:03 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22294</guid> <description>[...] Of Course NHibernate Is Slow When You Use It Incorrectly - Davy Brion [...]</description> <content:encoded><![CDATA[<p>[...] Of Course NHibernate Is Slow When You Use It Incorrectly &#8211; Davy Brion [...]</p> ]]></content:encoded> </item> <item><title>By: Gergely Orosz</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22293</link> <dc:creator>Gergely Orosz</dc:creator> <pubDate>Thu, 20 Aug 2009 14:55:31 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22293</guid> <description>I would disagree with two things in this post:
1. NHibernate did not lose in the comparison. I&#039;ve found that it&#039;s far slower when it comes to storage than Entity Framework however is much faster when deleting objects. In the other cases the speed of the two were somewhat similar. And in the conclusion I&#039;ve said that I wouldn&#039;t choose between these tools based on their performance as there was no clear ranking.2. The test was not a typical real world usage indeed, it pushed the limits of the tools and tried to do this in a fair way, the source is available for you to see. Session cache is probably not used in this test at all however this was meant to be a performance comparison test, not a load test.</description> <content:encoded><![CDATA[<p>I would disagree with two things in this post:<br
/> 1. NHibernate did not lose in the comparison. I&#8217;ve found that it&#8217;s far slower when it comes to storage than Entity Framework however is much faster when deleting objects. In the other cases the speed of the two were somewhat similar. And in the conclusion I&#8217;ve said that I wouldn&#8217;t choose between these tools based on their performance as there was no clear ranking.</p><p>2. The test was not a typical real world usage indeed, it pushed the limits of the tools and tried to do this in a fair way, the source is available for you to see. Session cache is probably not used in this test at all however this was meant to be a performance comparison test, not a load test.</p> ]]></content:encoded> </item> <item><title>By: Alberto</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22292</link> <dc:creator>Alberto</dc:creator> <pubDate>Thu, 20 Aug 2009 14:47:13 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22292</guid> <description>Ok, I guess I&#039;ll have to leave NHibernate for internal tools then :-(</description> <content:encoded><![CDATA[<p>Ok, I guess I&#8217;ll have to leave NHibernate for internal tools then <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22291</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 20 Aug 2009 13:45:10 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22291</guid> <description>no, because it doesn&#039;t really make sense to do so :)</description> <content:encoded><![CDATA[<p>no, because it doesn&#8217;t really make sense to do so <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Alberto</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22290</link> <dc:creator>Alberto</dc:creator> <pubDate>Thu, 20 Aug 2009 13:44:24 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22290</guid> <description>Thanks, it&#039;s just I&#039;m trying to come up with reasons to use NHibernate at work, but it seems to be hard to convince some people to move on to an ORM and forget about complex stored procedures. Have you ever used an ORM for a back office system in a bank?</description> <content:encoded><![CDATA[<p>Thanks, it&#8217;s just I&#8217;m trying to come up with reasons to use NHibernate at work, but it seems to be hard to convince some people to move on to an ORM and forget about complex stored procedures. Have you ever used an ORM for a back office system in a bank?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22289</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 20 Aug 2009 13:39:14 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22289</guid> <description>It&#039;s certainly not ideal for that kind of work. If you use a stateless session instead of a regular session the performance will be acceptable, but you could always do better.</description> <content:encoded><![CDATA[<p>It&#8217;s certainly not ideal for that kind of work. If you use a stateless session instead of a regular session the performance will be acceptable, but you could always do better.</p> ]]></content:encoded> </item> <item><title>By: Alberto</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22288</link> <dc:creator>Alberto</dc:creator> <pubDate>Thu, 20 Aug 2009 13:31:49 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22288</guid> <description>Hi Davy,I&#039;m new to NHibernate, have just played a little bit at home with it.
From what you&#039;re saying I deduce NHibernate is not to be used on a back office system, where most of the work we do consists of reading files up, transform some data and store every line in the DB.Am I right?Thanks.
Alberto.</description> <content:encoded><![CDATA[<p>Hi Davy,</p><p>I&#8217;m new to NHibernate, have just played a little bit at home with it.<br
/> From what you&#8217;re saying I deduce NHibernate is not to be used on a back office system, where most of the work we do consists of reading files up, transform some data and store every line in the DB.</p><p>Am I right?</p><p>Thanks.<br
/> Alberto.</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22287</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 20 Aug 2009 09:15:44 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22287</guid> <description>if there is still a performance difference between NHibernate and Entity Framework once Entity Framework has all of the same features in their Unit Of Work implementation, then i would agree ;)</description> <content:encoded><![CDATA[<p>if there is still a performance difference between NHibernate and Entity Framework once Entity Framework has all of the same features in their Unit Of Work implementation, then i would agree <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Ricardo Peres</title><link>http://davybrion.com/blog/2009/08/of-course-nhibernate-is-slow-when-you-use-it-incorrectly/comment-page-1/#comment-22286</link> <dc:creator>Ricardo Peres</dc:creator> <pubDate>Thu, 20 Aug 2009 09:14:20 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1511#comment-22286</guid> <description>Davy,I totally agree with you; also, I followed the (large) discussion between Oren and one of the authors of ORMBattle.NET, and I also tend to agree with him. However, I believe that is not the point on this case: both EF and NH implement the Unit of Work pattern, so the comparison between the two is valid, since they have the same purpose.Don&#039;t you agree?</description> <content:encoded><![CDATA[<p>Davy,</p><p>I totally agree with you; also, I followed the (large) discussion between Oren and one of the authors of ORMBattle.NET, and I also tend to agree with him. However, I believe that is not the point on this case: both EF and NH implement the Unit of Work pattern, so the comparison between the two is valid, since they have the same purpose.</p><p>Don&#8217;t you agree?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/21 queries in 0.009 seconds using disk: basic
Object Caching 609/610 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d18sni7re4ly7f.cloudfront.net

Served from: davybrion.com @ 2012-05-22 12:32:09 -->
