﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>https://ayende.com/blog/</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>NHibernate Profiler and Entity Framework Profiler 5.0 RTM</title><description>&lt;p&gt;&lt;a href="http://hibernatingrhinos.com/products/efprof"&gt;&lt;img width="393" height="356" title="image" align="right" style="border: 0px currentcolor; border-image: none; float: right; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/NHibernate-Profiler-and-Entity-Fra.0-RTM_DBDD/image_3.png" border="0"&gt;&lt;/a&gt;I’m really happy to announce that we have just release a brand new version of NHibernate Profiler and Entity Framework Profiler.&lt;/p&gt;&lt;p&gt;What is new in for &lt;a href="http://hibernatingrhinos.com/products/nhprof"&gt;NHibernate&lt;/a&gt;?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Support for NHibernate 5.1 and 5.1.1&lt;/li&gt;&lt;li&gt;Support for .NET Core&lt;/li&gt;&lt;ul&gt;&lt;li&gt;supported on the following platforms: netstandard2.0, net46, netcoreapp2.0&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Fixed various minor issues regarding showing duplicate errors and warnings from NHibernate.&lt;/li&gt;&lt;li&gt;Better support for DateTime precision issues in NHibernate 5.0&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;What is new for &lt;a href="http://hibernatingrhinos.com/products/efprof"&gt;Entity Framework&lt;/a&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Support for EF Core&lt;/li&gt;&lt;ul&gt;&lt;li&gt;supported on the following platforms: netstandard2.0, net46, netcoreapp2.0&lt;/li&gt;&lt;li&gt;netstandard1.6 is also supported via a separate dll. &lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Support for DataTable data type in custom reporting&lt;/li&gt;&lt;li&gt;Support for ReadCount and RecordsAFfected in EF Core 2.0&lt;/li&gt;&lt;li&gt;Fixed issue for EF 6 on .NET 4.7&lt;/li&gt;&lt;li&gt;Can report using thread name, not just application name&lt;/li&gt;&lt;li&gt;Provide integration hooks for ASP.Net Core to provide contextual information for queries.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;New stuff for both of them:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Improved column type mismatch warning &lt;/li&gt;&lt;li&gt;Support for UniqueIdentifier parameters type&lt;/li&gt;&lt;li&gt;Support for integration with VS 2017.&lt;/li&gt;&lt;/ul&gt;</description><link>https://ayende.com/blog/182657-A/nhibernate-profiler-and-entity-framework-profiler-5-0-rtm?Key=790101c4-869e-4198-8ebf-da3efdc21666</link><guid>https://ayende.com/blog/182657-A/nhibernate-profiler-and-entity-framework-profiler-5-0-rtm?Key=790101c4-869e-4198-8ebf-da3efdc21666</guid><pubDate>Tue, 17 Apr 2018 09:00:00 GMT</pubDate></item><item><title>re: Entity Framework Core performance tuning–part I</title><description>&lt;p&gt;I run into &lt;a href="http://www.thereformedprogrammer.net/entity-framework-core-performance-tuning-a-worked-example/"&gt;a really interesting article about performance optimizations with EF Core&lt;/a&gt; and I thought that it deserve a second &amp;amp; third look. You might have noticed that I have been putting a lot of emphasis on performance and I had literally spent years on optimizing relational database access patterns, including building a profiler dedicated for inspecting what an OR/M is doing. I &lt;a href="https://github.com/JonPSmith/EfCoreInAction/tree/Chapter13-Part4"&gt;got the source&lt;/a&gt; and run the application. &lt;/p&gt;&lt;p&gt;I have a small bet with myself, saying that in any application using a relational database, I’ll be able to find a SELECT N+1 issue within one hour. So far, I think that my rate is 92% or so. In this case, I found the SELECT N+1 issue on the very first page load.&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_2.png"&gt;&lt;img width="944" height="414" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_thumb.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Matching this to the code, we have:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_4.png"&gt;&lt;img width="371" height="83" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_thumb_1.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Which leads to:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_6.png"&gt;&lt;img width="493" height="308" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_thumb_2.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And here we can already tell that there is a problem, we aren’t accessing the authors. This actually happens here:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_8.png"&gt;&lt;img width="847" height="114" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_thumb_3.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So we have the view that is generating 10 out of 12 queries. And the more results per page you have, the more this costs.&lt;/p&gt;&lt;p&gt;But this is easily fixed once you know what you are looking at. Let us look at something else, the actual root query, it looks like this:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_10.png"&gt;&lt;img width="777" height="364" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_thumb_4.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Yes, I too needed a minute to recover from this. We have:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;One JOIN&lt;/li&gt;&lt;li&gt;Two correlated sub queries&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Jon was able to optimize his code by 660ms to 80ms, which is pretty awesome. But that is all by making modifications to the access pattern in the database. &lt;/p&gt;&lt;p&gt;Given what I do for a living, I’m more interested in what it does &lt;em&gt;inside&lt;/em&gt; the database, and here is what the query plan tells us:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_12.png"&gt;&lt;img width="640" height="241" title="image" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/image_thumb_5.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;There are only a few tens of thousands of records and the query is basically a bunch of index seeks and nested loop joins. But note that the way the query is structured forces the database to evaluate all possible results, then filter just the top few. That means that you have to wait until the entire result set has been processed, and as the size of your data grows, so will the cost of this query.&lt;/p&gt;&lt;p&gt;I don’t think that there is much that can be done here, given the relational nature of the data access ( no worries, I’m intending to write another post in this series, you guess what I’m going to write there, right?&lt;img class="wlEmoticon wlEmoticon-smile" style="" alt="Smile" src="https://ayende.com/blog/Images/Open-Live-Writer/re-Entity-Framework-Core-performance-tun_14DAB/wlEmoticon-smile_2.png"&gt; ).&lt;/p&gt;</description><link>https://ayende.com/blog/179969/re-entity-framework-core-performance-tuning-part-i?Key=967d95e3-402e-4184-8a7b-8c3940feaa59</link><guid>https://ayende.com/blog/179969/re-entity-framework-core-performance-tuning-part-i?Key=967d95e3-402e-4184-8a7b-8c3940feaa59</guid><pubDate>Wed, 04 Oct 2017 09:00:00 GMT</pubDate></item><item><title>NHibernate Profiler &amp; Entity Framework Profiler 4.0–Beta Release</title><description>&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/NHibernate-Profiler--Entit.0Beta-Release_AD04/image_19.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/NHibernate-Profiler--Entit.0Beta-Release_AD04/image_thumb_7.png" width="554" align="right" height="394"&gt;&lt;/a&gt;I’m happy to announce that the next version of the NHibernate and Entity Framework Profilers is ready for beta testing&lt;/p&gt; &lt;p&gt;You can download the new bits &lt;a href="https://hibernatingrhinos.com/builds/Uber-Prof-v4"&gt;from here&lt;/a&gt;.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Entity Framework – Support for EF Core (on .NET Core and .Net 4.6)  &lt;li&gt;NHibernate Profiler – Support for NHibernate 4.1 &lt;/li&gt; &lt;li&gt;Persisting interesting sessions across restarts.  &lt;li&gt;Improved filtering of SQL statements and behaviors, persisting your configuration across restarts and generally behaving as a responsible citizen.  &lt;li&gt;The ability to configure profiling via a &lt;a href="http://issues.hibernatingrhinos.com/issue/UberProf-347"&gt;watched file&lt;/a&gt;, to enable admins to enable/disable profiling on the fly.  &lt;li&gt;Allowing you to edit and run a SQL statement as well as compare the database query plan generated so you can get to an optimal solution.  &lt;li&gt;Various usability improvements (auto tracking of interesting data, always on top, compact mode for quick visualizations, better keyboard navigation, etc).&lt;/li&gt;&lt;/ul&gt;    &lt;p&gt;Please take them for a spin and provide us with feedback on it.&lt;/p&gt; &lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/NHibernate-Profiler--Entit.0Beta-Release_AD04/image_22.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/NHibernate-Profiler--Entit.0Beta-Release_AD04/image_thumb_8.png" width="486" align="right" height="446"&gt;&lt;/a&gt;&lt;/p&gt;</description><link>https://ayende.com/blog/176897/nhibernate-profiler-entity-framework-profiler-4-0-beta-release?Key=6556f5ee-8edf-4db6-9de6-dd27d1d8befd</link><guid>https://ayende.com/blog/176897/nhibernate-profiler-entity-framework-profiler-4-0-beta-release?Key=6556f5ee-8edf-4db6-9de6-dd27d1d8befd</guid><pubDate>Thu, 26 Jan 2017 10:00:00 GMT</pubDate></item><item><title>Special Offer: 29% discount for all our products</title><description>&lt;p&gt;Well, it is nearly the 29 May, and that means that I have been married for four years. &lt;p&gt;To celebrate that, I am offering a &lt;strong&gt;29%&lt;/strong&gt; discount on all our products (&lt;a href="http://ravendb.net/buy"&gt;RavenDB&lt;/a&gt;, &lt;a href="http://www.hibernatingrhinos.com/products/nhprof/buy"&gt;NHibernate Profiler&lt;/a&gt;, &lt;a href="http://www.hibernatingrhinos.com/products/efprof/buy"&gt;Entity Framework Profiler&lt;/a&gt;). &lt;p&gt;All you have to do is purchase any of our products using the following coupon code: &lt;blockquote&gt; &lt;p&gt;4th Anniversary&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This offer is valid to the end of the month only.&lt;/p&gt;</description><link>https://ayende.com/blog/170945/special-offer-29-discount-for-all-our-products?Key=7bc5d5a8-d6b7-43ae-924e-83d5524b8bb3</link><guid>https://ayende.com/blog/170945/special-offer-29-discount-for-all-our-products?Key=7bc5d5a8-d6b7-43ae-924e-83d5524b8bb3</guid><pubDate>Wed, 27 May 2015 08:16:00 GMT</pubDate></item><item><title>End of year discount, last 2 coupons remaining</title><description>&lt;p&gt;Reminding you that the end of year coupon has 2 remaining uses. &lt;p&gt;You can use: &lt;u&gt;0x21-celebrate-new-year&lt;/u&gt; to purchase any of the following with a 21% discount: &lt;ul&gt; &lt;li&gt;&lt;a href="http://ravendb.net/buy"&gt;RavenDB&lt;/a&gt; &lt;li&gt;&lt;a href="http://hibernatingrhinos.com/products/nhprof/buy"&gt;NHibernate Profiler&lt;/a&gt; &lt;li&gt;&lt;a href="http://hibernatingrhinos.com/products/efprof/buy"&gt;Entity Framework Profiler&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This is valid for today only, so hurry up.&lt;/p&gt;</description><link>https://ayende.com/blog/169697/end-of-year-discount-last-2-coupons-remaining?Key=12328495-62ad-450f-ac34-6f61749366ee</link><guid>https://ayende.com/blog/169697/end-of-year-discount-last-2-coupons-remaining?Key=12328495-62ad-450f-ac34-6f61749366ee</guid><pubDate>Wed, 31 Dec 2014 08:08:00 GMT</pubDate></item><item><title>End of year discount coupon has 7 remaining uses</title><description>&lt;p&gt;
	Reminding you that the end of year coupon has 7 remaining uses.&lt;/p&gt;
&lt;p&gt;
	You can use: &lt;u&gt;0x21-celebrate-new-year&lt;/u&gt; to purchase any of:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://ravendb.net/buy"&gt;RavenDB&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://hibernatingrhinos.com/products/nhprof/buy"&gt;NHibernate Profiler&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://hibernatingrhinos.com/products/efprof/buy"&gt;Entity Framework Profiler&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Happy Holidays and a great new years.&lt;/p&gt;
</description><link>https://ayende.com/blog/169633/end-of-year-discount-coupon-has-7-remaining-uses?Key=240c5620-aff1-4bb8-8134-ccb78938e3bd</link><guid>https://ayende.com/blog/169633/end-of-year-discount-coupon-has-7-remaining-uses?Key=240c5620-aff1-4bb8-8134-ccb78938e3bd</guid><pubDate>Tue, 23 Dec 2014 14:00:00 GMT</pubDate></item><item><title>End of year discount for all our products</title><description>&lt;p&gt;
	To celebrate the new year, we offer a &lt;strong&gt;21% discount &lt;/strong&gt;for all our products. This is available for the first &lt;strong&gt;33 customers &lt;/strong&gt;that use the coupon code: &lt;u&gt;0x21-celebrate-new-year&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;
	In previous years, we offered a similar number of uses for the coupon code, and they run out fast, so hurry up. This offer is valid for:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://ravendb.net/buy"&gt;RavenDB&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://hibernatingrhinos.com/products/nhprof/buy"&gt;NHibernate Profiler&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://hibernatingrhinos.com/products/efprof/buy"&gt;Entity Framework Profiler&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Happy Holidays and a great new years.&lt;/p&gt;
&lt;p&gt;
	On a personal note, this marks the full release of all our product lines, and it took an incredible amount of work. I&amp;#39;m very pleased that we have been able to get the new version out there and in your hands, and to have you start making use of the features that we have been working on for so long.&lt;/p&gt;
</description><link>https://ayende.com/blog/169537/end-of-year-discount-for-all-our-products?Key=9d62ffc7-b15f-47ee-8110-de5e4ed34982</link><guid>https://ayende.com/blog/169537/end-of-year-discount-for-all-our-products?Key=9d62ffc7-b15f-47ee-8110-de5e4ed34982</guid><pubDate>Thu, 11 Dec 2014 10:00:00 GMT</pubDate></item><item><title>NHibernate &amp; Entity Framework Profiler 3.0</title><description>&lt;p&gt;
	It may not get enough attention, but we have been working on the profilers as well during the past few months.&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
		TLDR; You can get the next generation of &lt;a href="http://www.hibernatingrhinos.com/products/nhprof"&gt;NHibernate Profiler&lt;/a&gt; and &lt;a href="http://www.hibernatingrhinos.com/products/efprof"&gt;Entity Framework Profiler&lt;/a&gt; now, lots of goodies to look at!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	I&amp;rsquo;m sure that a lot of people would be thrilled to hear that we dropped Silverlight in favor of going back to WPF UI. The idea was that we would be able to deploy anywhere, including in production. But Silverlight just made things harder all around, and customers didn&amp;rsquo;t like the production profiling mode.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Production Profiling&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	We have changed how we profile in production. You can now make the following call in your code:&lt;/p&gt;
&lt;blockquote&gt;
	&lt;pre class="csharpcode"&gt;
NHibernateProfiler.InitializeForProduction(port, password);&lt;/pre&gt;
	&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }	&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	And then connect to your production system:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_2.png"&gt;&lt;img alt="image" border="0" height="470" src="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_thumb.png" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" title="image" width="416" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	At which point you can profile what is going on in your production system safely and easily. The traffic between your production server and the profiler is SSL encrypted.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;NHibernate 4.x and Entity Framework vNext support&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	The profilers now support the latest version of NHibernate and Entity Framework. That include profiling async operations, better suitability for modern apps, and more.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;New SQL Paging Syntax&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	We are now properly support SQL Server paging syntax:&lt;/p&gt;
&lt;blockquote&gt;
	&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;select&lt;/span&gt; * &lt;span class="kwrd"&gt;from&lt;/span&gt; Users
&lt;span class="kwrd"&gt;order&lt;/span&gt; &lt;span class="kwrd"&gt;by&lt;/span&gt; Name
offset 0 /* @p0 */ &lt;span class="kwrd"&gt;rows&lt;/span&gt; &lt;span class="kwrd"&gt;fetch&lt;/span&gt; &lt;span class="kwrd"&gt;next&lt;/span&gt; 250 /* @p1 */ &lt;span class="kwrd"&gt;rows&lt;/span&gt; &lt;span class="kwrd"&gt;only&lt;/span&gt;
&lt;/pre&gt;
	&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }	&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	This is great for NHibernate users, who finally can have a sane paging syntax as well as beautiful queries in the profiler.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;At a glance view&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	A lot of the time, you don&amp;rsquo;t want the profiler to be front and center, you want to just run it and have it there to glance at once in a while. The new compact view gives you just that:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_4.png"&gt;&lt;img alt="image" border="0" height="232" src="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_thumb_1.png" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" title="image" width="628" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	You can park it at some point in your screen and work normally, glancing to see if it found anything. This is much less distracting than the full profiler for normal operations.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Scopes and groups&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	When we started working on the profilers, we followed the &amp;ldquo;one session per request&amp;rdquo; rule, and that was pretty good. But a lot of people, especially in the Entity Framework group are using multiple sessions or data contexts in a single request, but they still want to see the ability to see the operations in a request at a glance. We are now allowing you to group things, like this:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_6.png"&gt;&lt;img alt="image" border="0" height="415" src="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_thumb_2.png" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" title="image" width="628" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	By default, we use the current request to group things, but we also give you the ability to define your own scopes. So if you are profiling NServiceBus application, you can set the scope as your message handling by setting ProfilerIntegration.GetCurrentScopeName or explicitly calling ProfilerIntegration.StartScope whenever you want.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Customized profiling&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	You can now surface troublesome issues directly from your code. If you have an issue with a query, you can mark it for attention using &lt;b&gt;CustomQueryReporting&lt;/b&gt; .ReportError() that would flag it in the UI for further investigation.&lt;/p&gt;
&lt;p&gt;
	You can also just mark interesting pieces in the UI without an error, like so:&lt;/p&gt;
&lt;blockquote&gt;
	&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;using&lt;/span&gt; (var db = &lt;span class="kwrd"&gt;new&lt;/span&gt; Entities(conStr))
{
    var post1 = db.Posts.FirstOrDefault();

   &lt;strong&gt; &lt;span class="kwrd"&gt;using&lt;/span&gt; (ProfilerIntegration.StarStatements(&lt;span class="str"&gt;&amp;quot;Blue&amp;quot;&lt;/span&gt;))&lt;/strong&gt;
    {
        var post2 = db.Posts.FirstOrDefault();
    }

    var post3 = db.Posts.FirstOrDefault();
    
    &lt;strong&gt;ProfilerIntegration.StarStatements();&lt;/strong&gt;
    var post4 = db.Posts.FirstOrDefault();
  &lt;strong&gt;  ProfilerIntegration.StarStatementsClear();
&lt;/strong&gt;
    var post5 = db.Posts.FirstOrDefault();
}&lt;/pre&gt;
	&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }	&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	Which will result in:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_8.png"&gt;&lt;img alt="image" border="0" height="359" src="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/image_thumb_3.png" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" title="image" width="628" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Disabling profiler from configuration&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	You can now disable the profiler by setting:&lt;/p&gt;
&lt;blockquote&gt;
	&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;HibernatingRhinos.Profiler.Appender.NHibernate&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Disabled&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
	&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }	&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	This will avoid initializing the profiler, obviously. The intent is that you can setup production profiling, disable it by default, and enable it selectively if you need to actually figure things out.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Odds &amp;amp; ends&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	We move to WebActivatorEx&amp;nbsp; from the deprecated WebActivator, added xml file for the appender, fixed a whole &lt;em&gt;bunch&lt;/em&gt; of small bugs, the most important among them is:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/clip_image001%5B4%5D.png"&gt;&lt;img alt="clip_image001[4]" border="0" height="272" src="http://ayende.com/blog/Images/Windows-Live-Writer/The-profilers-are-back_B25A/clip_image001%5B4%5D_thumb.png" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" title="clip_image001[4]" width="289" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Linq to SQL, Hibernate and LLBLGen Profilers, RIP&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	You might have noticed that I talked only about NHibernate and Entity Framework Profilers. The sales for the rests weren&amp;rsquo;t what we hoped they would be, and we are no longer going to sale them.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Go get them, there is a new release discount&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	You can get the &lt;a href="http://www.hibernatingrhinos.com/products/nhprof"&gt;NHibernate Profiler&lt;/a&gt; and &lt;a href="http://www.hibernatingrhinos.com/products/efprof"&gt;Entity Framework Profiler&lt;/a&gt; for a 15% discount for the next two weeks.&lt;/p&gt;
</description><link>https://ayende.com/blog/169155/nhibernate-entity-framework-profiler-3-0?Key=79bb89d6-8948-421a-a57c-20d3cd4e716c</link><guid>https://ayende.com/blog/169155/nhibernate-entity-framework-profiler-3-0?Key=79bb89d6-8948-421a-a57c-20d3cd4e716c</guid><pubDate>Thu, 04 Dec 2014 10:00:00 GMT</pubDate></item><item><title>Working on the Uber Profiler 3.0</title><description>&lt;p&gt;One of the things that tend to get lost is the fact that Hibernating Rhinos is doing more than just working on RavenDB. The tagline we like to use is Easier Data, and the main goal we have is to provide users with better ways to access, monitor and manage their data.&lt;/p&gt; &lt;p&gt;We have started planning the next version of the Uber Profiler, that means Entity Framework Profiler, NHibernate Profiler, etc. Obviously, we’ll offer support for EF 7.0 and NHibernate 4.0, and we had gathered quite a big dataset for common errors when using an OR/M, which we intend to convert into useful guidance whenever our users run into such an issue. &lt;/p&gt; &lt;p&gt;But I realized that I was so busy working on RavenDB that I forgot to even mention the work we’ve been doing elsewhere. And I also wanted to solicit feedback about the kind of features you’ll want to see in the 3.0 version of the profilers.&lt;/p&gt;</description><link>https://ayende.com/blog/166849/working-on-the-uber-profiler-3-0?Key=99c86dc7-4ab3-41a0-b16e-0e2f09f8196d</link><guid>https://ayende.com/blog/166849/working-on-the-uber-profiler-3-0?Key=99c86dc7-4ab3-41a0-b16e-0e2f09f8196d</guid><pubDate>Wed, 28 May 2014 09:00:00 GMT</pubDate></item><item><title>Special Offer: 29% discount for all our products</title><description>&lt;p&gt;Well, it is nearly the 29 May, and that means that I have been married for two years.&lt;/p&gt; &lt;p&gt;To celebrate that, I am offering a 29% discount on all our products (&lt;a href="http://ravendb.net/buy"&gt;RavenDB&lt;/a&gt;, &lt;a href="http://www.hibernatingrhinos.com/products/nhprof/buy"&gt;NHibernate Profiler&lt;/a&gt;, &lt;a href="http://www.hibernatingrhinos.com/products/efprof/buy"&gt;Entity Framework Profiler&lt;/a&gt;, etc).&lt;/p&gt; &lt;p&gt;All you have to do is purchase any of our products using the following coupon code: &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;2nd anniversary&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This offer is valid to the end of the month, so hurry up.&lt;/p&gt;</description><link>https://ayende.com/blog/162337/special-offer-29-discount-for-all-our-products?Key=5d9dd3f7-8898-4f57-b3ab-79ee79ece958</link><guid>https://ayende.com/blog/162337/special-offer-29-discount-for-all-our-products?Key=5d9dd3f7-8898-4f57-b3ab-79ee79ece958</guid><pubDate>Sun, 26 May 2013 10:12:00 GMT</pubDate></item><item><title>Uber Prof 2.0 is OUT!</title><description>&lt;p&gt;Exactly 4 years after the 1.0 release of Uber Prof, we have the 2.0 release for Uber Prof.&lt;/p&gt; &lt;p&gt;You can find it here: &lt;a href="http://hibernatingrhinos.com/products/"&gt;http://hibernatingrhinos.com/products/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;New features include production and cloud profiling, performance improvement and better error detection &amp;amp; guidance.&lt;/p&gt;</description><link>https://ayende.com/blog/160577/uber-prof-2-0-is-out?Key=98e152f5-2a43-41d9-b560-93304ce79061</link><guid>https://ayende.com/blog/160577/uber-prof-2-0-is-out?Key=98e152f5-2a43-41d9-b560-93304ce79061</guid><pubDate>Tue, 01 Jan 2013 10:00:00 GMT</pubDate></item><item><title>Goodbye, 2012: Our end of year discount starts now!</title><description>&lt;p&gt;Well, as the year draws to a close, it is that time again, I got older, apparently. Yesterday marked my 31th trip around the sun.&lt;/p&gt; &lt;p&gt;To celebrate, I decided to give the first 31 people a &lt;strong&gt;31% discount&lt;/strong&gt; for all of our products.&lt;/p&gt; &lt;p&gt;This offer applies to:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://ravendb.net/licensing"&gt;Raven DB&lt;/a&gt; (Standard edition)&lt;/li&gt; &lt;li&gt;&lt;a href="http://hibernatingrhinos.com/products/nhprof/buy"&gt;NHibernate Profiler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://hibernatingrhinos.com/products/efprof/buy"&gt;Entity Framework Profiler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://hibernatingrhinos.com/products/l2sprof/buy"&gt;Linq to SQL Profiler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://hibernatingrhinos.com/products/llblgenprof/buy"&gt;LLBLGen Profiler&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This also applies to our support &amp;amp; consulting services.&lt;/p&gt; &lt;p&gt;All you have to do is to use the following coupon code: goodbye-2012&lt;/p&gt; &lt;p&gt;Enjoy the end of the year, and happy holidays.&lt;/p&gt;</description><link>https://ayende.com/blog/160385/goodbye-2012-our-end-of-year-discount-starts-now?Key=3cc53059-f0aa-48ca-ba7f-9131593f0f0a</link><guid>https://ayende.com/blog/160385/goodbye-2012-our-end-of-year-discount-starts-now?Key=3cc53059-f0aa-48ca-ba7f-9131593f0f0a</guid><pubDate>Fri, 21 Dec 2012 05:02:00 GMT</pubDate></item><item><title>Production Cloud Profiling With Uber Prof</title><description>&lt;p&gt;With Uber Prof 2.0 (&lt;a href="http://nhprof.com/"&gt;NHibernate Profiler&lt;/a&gt;, &lt;a href="http://efprof.com/"&gt;Entity Framework Profiler&lt;/a&gt;, &lt;a href="http://l2sprof.com/"&gt;Linq to SQL Profiler&lt;/a&gt;, &lt;a href="http://llblgenprof.com/"&gt;LLBLGen Profiler&lt;/a&gt;) we are going to bring you a new era of goodness.&lt;/p&gt; &lt;p&gt;In 1.0, we gave you a LOT of goodness for the development stage of building your application, but now we are able to take it a few steps further. Uber Prof 2.0 supports production profiling, which means that you can run it &lt;em&gt;in production&lt;/em&gt; and see what is going on &lt;em&gt;in your application now!&lt;/em&gt;&lt;/p&gt; &lt;p&gt;To make things even more interesting, we have also done a lot of work to make sure that this works on the cloud as well. For example, go ahead and look at this site: &lt;a title="http://efprof.cloudapp.net/" href="http://efprof.cloudapp.net/"&gt;http://efprof.cloudapp.net/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This is a live application, that doesn’t really do anything special, I’ll admit. But the kicker is when you go to this URL: &lt;a title="http://efprof.cloudapp.net/profiler/profiler.html" href="http://efprof.cloudapp.net/profiler/profiler.html"&gt;http://efprof.cloudapp.net/profiler/profiler.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Cloud-Profiling-With-Uber-Prof_8519/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Cloud-Profiling-With-Uber-Prof_8519/image_thumb.png" width="944" height="315"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This is EF Prof, running on the cloud, and giving you the results that you want, &lt;em&gt;live&lt;/em&gt;. You can read all about this feature and &lt;a href="http://blog.hibernatingrhinos.com/12769/uber-prof-production-profilingndash-profiling-production-application-on-azure?key=6fc682a1295942c592ad8f11b18ec185"&gt;how to enable it here&lt;/a&gt;, but I am sure that you can see the implications. &lt;/p&gt;</description><link>https://ayende.com/blog/160321/production-cloud-profiling-with-uber-prof?Key=7504912e-62b1-4a6d-92a6-becb03303035</link><guid>https://ayende.com/blog/160321/production-cloud-profiling-with-uber-prof?Key=7504912e-62b1-4a6d-92a6-becb03303035</guid><pubDate>Tue, 18 Dec 2012 10:00:00 GMT</pubDate></item><item><title>Uber Prof V2.0 is now in Public Beta</title><description>&lt;p&gt;Well, we worked quite a bit on that, but the Uber Prof (NHibernate Profiler, Entity Framework Profiler, Linq to SQL Profiler, etc) version 2.0 are now out for public beta.&lt;/p&gt; &lt;p&gt;We made a &lt;em&gt;lot&lt;/em&gt; of improvements. Including performance, stability and responsiveness, but probably the most important thing from the user perspective is that we now support running the profiler in production, and even on the cloud.&lt;/p&gt; &lt;p&gt;We will have the full listing of all the new goodies up on the company site soon, including detailed instructions on how to enable production profiling and on cloud profiling, but I just couldn’t wait to break the news to you.&lt;/p&gt; &lt;p&gt;In fact, along with V2.0 of the profilers, we have a brand new site for our company, which you can check here: &lt;a href="http://hibernatingrhinos.com/"&gt;http://hibernatingrhinos.com/&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;To celebrate the fact that we are going on beta, we also offer a &lt;strong&gt;20%&lt;/strong&gt; discount for the duration of the beta.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Nitpicker corner, please remember that this &lt;em&gt;is&lt;/em&gt; a beta, there are bound to be problems, and we will fix them as soon as we can.&lt;/p&gt;&lt;/blockquote&gt;</description><link>https://ayende.com/blog/159425/uber-prof-v2-0-is-now-in-public-beta?Key=90fbb3f4-d674-4f99-a280-aec8792e20cb</link><guid>https://ayende.com/blog/159425/uber-prof-v2-0-is-now-in-public-beta?Key=90fbb3f4-d674-4f99-a280-aec8792e20cb</guid><pubDate>Mon, 22 Oct 2012 06:25:00 GMT</pubDate></item><item><title>Über Profiler v2.0–Private Beta is open</title><description>&lt;p&gt;Well, it took a while, but the next version of the NHibernate Profiler is ready to go to a private beta.&lt;/p&gt; &lt;p&gt;We go to private beta before the product is done, because we want to get as much early feedback as we can.&lt;/p&gt; &lt;p&gt;We have 10 spots for NHibernate Profiler v2.0 and 10 spots for Entity Framework Profiler v2.0.&lt;/p&gt; &lt;p&gt;If you are interested, please send me an email about this.&lt;/p&gt;</description><link>https://ayende.com/blog/157985/uber-profiler-v2-0-private-beta-is-open?Key=addf4b10-01f6-4b74-8f8f-c643f83b0d43</link><guid>https://ayende.com/blog/157985/uber-profiler-v2-0-private-beta-is-open?Key=addf4b10-01f6-4b74-8f8f-c643f83b0d43</guid><pubDate>Thu, 16 Aug 2012 09:00:00 GMT</pubDate></item><item><title>An Entity Framework Profiler user story</title><description>&lt;p&gt;One of the things that I really love about build things like the profilers and RavenDB is that it gives me the chance to really spread a lot of my experience in codified form. Occasionally, we get customer feedback to that effect, and I thought that I would share this one with you.  &lt;p&gt;Jeremy Holt have been using the &lt;a href="http://efprof.com"&gt;Entity Framework Profiler&lt;/a&gt; and has the following to say: &lt;blockquote&gt; &lt;p&gt;The biggest issue it has highlighted for me is the question of the Context being created on different threads (the N+1 was easy to get my head around and resolve). The problem is the difficulty in finding definitive examples of how/when the Context should be created. (Also found my unbound queries – thanks for that!!) &lt;p&gt;It was working great (except for a couple of threading issues J) until I ran EFProf. I love the “page of shame” in EFProf – I think you called it “query analysis alerts” or something pompous like that – may I suggest you rename it to “errors dumb programmers make” J&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I don’t think that this will be renamed, but this does point out something very important. What we are doing with the profilers is much more than simply show you what your application is doing. We are actually analyzing this data through a complex set of rules in order to find common pitfalls. In Jeremy’s case, the common ones were cross thread usage and Select N+1. &lt;p&gt;And by highlighting those issues, the profiler make it easy to do so. More so, it make you feel &lt;em&gt;good&lt;/em&gt; about doing this, in a way that you wouldn’t get from standard analytics tools. &lt;p&gt;By having thresholds that you can visibly see and avoid, you get to create better software.&lt;/p&gt;</description><link>https://ayende.com/blog/156001/an-entity-framework-profiler-user-story?Key=362194c3-0d1d-4207-80c8-213ec711f915</link><guid>https://ayende.com/blog/156001/an-entity-framework-profiler-user-story?Key=362194c3-0d1d-4207-80c8-213ec711f915</guid><pubDate>Tue, 05 Jun 2012 09:00:00 GMT</pubDate></item><item><title>Application analysis: Northwind.NET</title><description>&lt;p&gt;For an article I am writing, I wanted to compare a RavenDB model to a relational model, and I stumbled upon the following &lt;a href="http://northwind.codeplex.com/"&gt;Northwind.NET project&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;I plugged in the &lt;a href="http://efprof.com"&gt;Entity Framework Profiler&lt;/a&gt; and set out to watch what was going on. To be truthful, I expected it to be bad, but I honestly did &lt;em&gt;not&lt;/em&gt; expect what I got. Here is a question, how many queries does it take to render the following screen?&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_thumb.png" width="940" height="693"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The answer, believe it or no, is 17:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_thumb_1.png" width="771" height="409"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You might have noticed that most of the queries look quite similar, and indeed, they &lt;em&gt;are&lt;/em&gt;. We are talking about 16(!) identical queries:&lt;/p&gt; &lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [Extent1].[ID]           &lt;span class="kwrd"&gt;AS&lt;/span&gt; [ID],
       [Extent1].[Name]         &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Name],
       [Extent1].[Description]  &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Description],
       [Extent1].[Picture]      &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Picture],
       [Extent1].[RowTimeStamp] &lt;span class="kwrd"&gt;AS&lt;/span&gt; [RowTimeStamp]
&lt;span class="kwrd"&gt;FROM&lt;/span&gt;   [dbo].[Category] &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Extent1]&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt;
&lt;p&gt;Looking at the stack trace for one of those queries led me to:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_thumb_2.png" width="1014" height="352"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And to this piece of code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_thumb_3.png" width="758" height="371"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You might note that dynamic is used there, for what reason, I cannot even guess. Just to check, I added a ToArray() to the result of GetEntitySet, and the number of queries dropped from 17 to 2, which is more reasonable. The problem was that we passed an IQueryable to the data binding engine, which ended up evaluating the query multiple times.&lt;/p&gt;
&lt;p&gt;And &lt;a href="http://efprof.com"&gt;EF Prof&lt;/a&gt; actually warns about that, too:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_10.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Application-analysis_B141/image_thumb_4.png" width="763" height="120"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At any rate, I am afraid that this project suffer from similar issues all around, it is actually too bad to serve as the bad example that I intended it to be.&lt;/p&gt;</description><link>https://ayende.com/blog/152705/application-analysis-northwind-net?Key=50a77d7b-0d0f-4b53-9305-eba261b563c1</link><guid>https://ayende.com/blog/152705/application-analysis-northwind-net?Key=50a77d7b-0d0f-4b53-9305-eba261b563c1</guid><pubDate>Fri, 30 Dec 2011 10:00:00 GMT</pubDate></item><item><title>Gilad Shalit is back</title><description>&lt;p&gt;I don’t usually do posts about current events, but &lt;a href="http://www.ynetnews.com/articles/0,7340,L-4136451,00.html"&gt;this one is huge&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;To celebrate the event, you can use the following coupon code: SLT-45K2D4692G to get 19.41% discount (Gilad was captive for 1,941 days) for all our profilers:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://nhprof.com/"&gt;NHibernate Profiler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://efprof.com/"&gt;Entity Framework Profiler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://l2sprof.com/"&gt;Linq to SQL Profiler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://llblgenprof.com/"&gt;LLBLGen Profiler&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="http://hibernateprofiler.com/"&gt;Hibernate Profiler&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Hell, even our &lt;a href="http://nhprof.com/commercialsupport"&gt;commercial support for NHibernate&lt;/a&gt; is participating.&lt;/p&gt; &lt;p&gt;Please note that any political comment to this post that I don’t agree with will be deleted.&lt;/p&gt;</description><link>https://ayende.com/blog/130049/gilad-shalit-is-back?Key=b8b09d35-b65b-4925-9046-a6315d3899aa</link><guid>https://ayende.com/blog/130049/gilad-shalit-is-back?Key=b8b09d35-b65b-4925-9046-a6315d3899aa</guid><pubDate>Tue, 18 Oct 2011 10:00:00 GMT</pubDate></item><item><title>Entity Framework 4.1 Update 1, Backward Compatibility and Microsoft</title><description>&lt;p&gt;One of the things that you keep hearing about Microsoft products is how much time and effort is dedicated to ensuring Backward Compatibility. I have had a lot of arguments with Microsoft people about certain design decisions that they have made, and usually the argument ended up with “We have to do it this was to ensure Backward Compatibility”. &lt;/p&gt; &lt;p&gt;That sucked, but at least I could sleep soundly, knowing that if I had software running on version X of Microsoft, I could at least be pretty sure that it would work in X+1.&lt;/p&gt; &lt;p&gt;Until Entity Framework 4.1 Update 1 shipped, that is. &lt;a href="http://weblogs.asp.net/fbouma/archive/2011/07/28/entity-framework-v4-1-update-1-the-kill-the-tool-eco-system-version.aspx"&gt;Frans Bouma has done a great job in describing what the problem actually is&lt;/a&gt;, including going all the way and actually submitting a patch with the code required to fix this issue.&lt;/p&gt; &lt;p&gt;But basically, starting with Entity Framework 4.1 Update 1 (the issue also appears in Entity Framework 4.2 CTP, but I don’t care about this much now), you can’t use generic providers with Entity Framework. Just to explain, generic providers is pretty much the one way that you can integrate with Entity Framework if you want to write a profiler or a cacher or a… you get the point.&lt;/p&gt; &lt;p&gt;Looking at the code, it is pretty obvious that this is &lt;em&gt;not&lt;/em&gt; intentional, but just someone deciding to implement a method without considering the full ramifications. When I found out about the bug, I tried figuring out a way to resolve it, but the only work around would require me to provide a different assembly for each provider that I wanted to support (and there are dozens that we support on EF 4.0 and EF 3.5 right now).&lt;/p&gt; &lt;p&gt;We have currently &lt;strong&gt;implemented a work around for SQL Server only&lt;/strong&gt;, but if you want to use Entity Framework Profiler with Entity Framework 4.1 Update 1 and a database other than SQL Server, we would have to create a special build for your scenario, rather than have you use the generic provider method, which have worked so far. &lt;/p&gt; &lt;p&gt;Remember the beginning of this post? How I said that Backward Compatibility is something that Microsoft is taking so seriously? &lt;/p&gt; &lt;p&gt;Naturally I felt that this (a bug that impacts anyone who extends Entity Framework in such a drastic way) is an important issue to raise with Microsoft. So I contacted the team with my finding, and the response that I got was basically: Use the old version if you want this supported.&lt;/p&gt; &lt;p&gt;What I &lt;em&gt;didn’t &lt;/em&gt;get was:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Addressing the issue of a breaking change of this magnitude that isn’t even on a major release, it is an &lt;em&gt;update to a minor release.&lt;/em&gt;&lt;/li&gt; &lt;li&gt;Whatever they are even going to fix it, and when this is going to be out.&lt;/li&gt; &lt;li&gt;Whatever the next version (4.2 CTP also have this bug) is going to carry on this issue or not.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I find this unacceptable. The fact that there is a problem with a CTP is annoying, but not that important. The fact that a &lt;em&gt;fully release package&lt;/em&gt; has this backward compatibility issue is horrible.  &lt;p&gt;What makes it even worse is the fact that this is an update to a minor version, people excepts this to be a safe upgrade, not something that requires full testing. And &lt;em&gt;anyone&lt;/em&gt; who is going to be running Update-Package in VS is going to hit this problem, and Update-Package is something that people do very often. And suddenly, Entity Framework Profiler can no longer work.  &lt;p&gt;Considering the costs that the entire .NET community has to bear in order for Microsoft to preserve backward compatibility, I am deeply disappointed that when I actually need this backward compatibility.  &lt;p&gt;This is from the same guys that refused (for five years!) to fix &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/93559/typeconverter-for-value-types-such-as-int-bool-short-etc-return-true-to-isvalid-even-if-the-value-is-not-valid"&gt;this bug&lt;/a&gt;: &lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;new&lt;/span&gt; System.ComponentModel.Int32Converter().IsValid(&lt;span class="str"&gt;"yellow"&lt;/span&gt;) == true&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;Because, and I quote:
&lt;blockquote&gt;
&lt;p&gt;We do not have the luxury of making that risky assumption that people will not be affected by the potential change. I know this can be frustrating for you as it is for us. Thanks for your understanding in this matter.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Let me put this to you in perspective, anyone who is using EF Prof is likely to (almost by chance) to get hit by that. When this happens, our only option is to tell them to switch back a version? 
&lt;p&gt;That makes &lt;em&gt;us &lt;/em&gt;look very bad, &lt;em&gt;regardless&lt;/em&gt; of what is the actual reason for that. That means that I am having to undermine my users' trust in my product. "He isn't supporting 4.1, and he might not support 4.2, so we probably can't buy his product, because we want to have the newest version". 
&lt;p&gt;This is very upsetting. Not so much about the actual bug, those happen, and I can easily imagine the guy writing the code making assumptions that turn out to be false. Heavens know that I have done the same many times before. I don’t even worry too much about this having escaped the famous Microsoft Testing Cycle. 
&lt;p&gt;What (to be frank) pisses me off is that the response that we got from Microsoft for this was that they aren’t going to fix this. That the only choice that I have it to tell people to downgrade if they want to use my product (with all the implications that has for my product).&lt;/p&gt;
&lt;p&gt;&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://ayende.com/blog/Images/Windows-Live-Writer/Entity-Framework-4.1_B4A0/wlEmoticon-sadsmile_2.png"&gt;&lt;/p&gt;</description><link>https://ayende.com/blog/75777/entity-framework-4-1-update-1-backward-compatibility-and-microsoft?Key=72c586ff-448c-420b-bdc4-214f3a172040</link><guid>https://ayende.com/blog/75777/entity-framework-4-1-update-1-backward-compatibility-and-microsoft?Key=72c586ff-448c-420b-bdc4-214f3a172040</guid><pubDate>Fri, 05 Aug 2011 09:00:00 GMT</pubDate></item><item><title>What is next for the profilers?</title><description>&lt;p&gt;We have been working on the profilers (&lt;a href="http://nhprof.com/"&gt;NHibernate Profiler&lt;/a&gt;, &lt;a href="http://efprof.com/"&gt;Entity Framework Profiler&lt;/a&gt;, &lt;a href="http://l2sprof.com/"&gt;Linq to SQL Profiler&lt;/a&gt;, &lt;a href="http://llblgenprof.com/"&gt;LLBLGen Profiler&lt;/a&gt; and &lt;a href="http://hibernateprofiler.com"&gt;Hibernate Profiler&lt;/a&gt;) for close to three years now. And we have been running always as 1.x, so we didn’t have a major release (although we have continual releases, we currently have close to 900 drops of the 1.x version).&lt;/p&gt; &lt;p&gt;The question now becomes, what is going to happen in the next version of the profiler?&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Production Profiling, the ability to setup your application so that you can connect to your production application and see what is going on &lt;em&gt;right now&lt;/em&gt;. &lt;/li&gt; &lt;li&gt;Error Analysis, the ability to provide you with additional insight and common solution to recurring problems.&lt;/li&gt; &lt;li&gt;Global Query Analysis, the ability to take all of your queries, look at their query plans and show your potential issues.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Those are the big ones, we have a few others, and a surprise in store &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://ayende.com/blog/Images/Windows-Live-Writer/What-is-next-for-the-profilers_868C/wlEmoticon-smile_2.png"&gt;&lt;/p&gt; &lt;p&gt;What would you want to see in the next version of the profiler?&lt;/p&gt;</description><link>https://ayende.com/blog/11265/what-is-next-for-the-profilers?Key=98ae56ef-3200-41b0-beec-1c206cbe1608</link><guid>https://ayende.com/blog/11265/what-is-next-for-the-profilers?Key=98ae56ef-3200-41b0-beec-1c206cbe1608</guid><pubDate>Thu, 02 Jun 2011 09:00:00 GMT</pubDate></item></channel></rss>