Tim Barcz

Sponsors

The Lounge

Wicked Cool Jobs

Groups and Affiliations

Syndication

News

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
NHProfiler - An Early Look

Over the past week I've had the distinct opportunity to have a first-hand look into NHProf, Ayende's upcoming profiler for NHibernate.  It's been an honor to be part of the team that is putting NHProfiler through its paces.  While NHProfiler is still in private beta it is very impressive and I want to let you peek inside.

This evening I decided to sit down and spend some time poking around an application and watch NHProfiler to see if anything seemed out of sorts.  Here's what I found:

Easy To Understand

You can get by without purchasing NHProf, from what I see there's nothing you can't "figure out" yourself.  NHProf is a lot like ReSharper or CodeRush, you can get by without it, but why would you want to?  Here's what I mean, you can pop open SQL Server Profiler and see what is being executed:

image

That's messy but take a look at how NHProf collates the data:

image

Relevant

You can sift through the SQL Server Profiler trace if you'd like to but NHProfiler does a great job in giving you the same information, just presented better.

image

From this view I can see that five queries were run and I can see that three of the same queries are being issued which might point to an area where there is some tweaking to do.

Performance Gains

We all want our applications to run faster.  We want speed and performance but often times its takes quite a bit of time to find performance problems and their subsequent fixes.  NHProfiler allowed me to very quickly find some queries that didn't need to be executing and tweak some code to eliminate those calls.  Since I can see the code that NHibernate generates I can also make modifications to query I'm submitting to NHibernate for further performance gains.

In a very short amount of time (the writing of this blog post has taken several times longer) I was able to reduce reduce data access time by a factor of nearly 10.  How do I know that, I have the hard data to prove it.

Before:

image

After:

image

Conclusion

If you use NHibernate, NHProfiler is a must.  By using NHProf to observe my applications I'm able to save my time and not have to burrow through SQL Server Profiler or wonder what is going on at the data level.  I am quickly able to observe what is going on and when and make any necessary modification and then observe the outcome.  While you can use Visual Studio without ReSharper or CodeRush many of you out there have found you just don't want to.  After using these productivity tools you find that you're able to work with less friction.  NHProfiler is the same way, you can work without it, but I highly recommend against it.

Keep your eye on Ayende's blog for information coming soon.


Posted 12-09-2008 1:09 AM by Tim Barcz
Filed under: , ,

[Advertisement]

Comments

Dew Drop - December 9, 2008 | Alvin Ashcraft's Morning Dew wrote Dew Drop - December 9, 2008 | Alvin Ashcraft's Morning Dew
on 12-09-2008 10:10 AM

Pingback from  Dew Drop - December 9, 2008 | Alvin Ashcraft's Morning Dew

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco <-- NEW Friend!
NServiceBus <-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)