views:

156

answers:

4

We are using nHibernate 1.2 in a system which is not performing good. Will there be some performance improvement if we migrate to latest version of nHibernate?

Overall is it a good idea to migrate to the latest version of nHibernate?

EDIT: I want to use following features to improve performance.
1. Second level cache. 2. Joined Table. 3. MultiQuery to batch queries.

+1  A: 

Depending - no. I would consider going straight to the development trunk.... for the added / better LINQ support. Not sure when that gets beta, but I would risk it. The "current" LINQ is hard to usable (no "StartsWith" query, so even basic search forms are mostly out).

If you can risk it, it is worth it. LINQ per se alone is always a reason to migrate - pretty brutal step to a lot better searches ;)

TomTom
+1  A: 

Only if you require the use of the latest features offered by NHibernate 2.0. Here's a link where the new features are listed.

Road Map

My experience taught me why the expression: "If it's not broken, don't fix it!" stands. This is the same here. However, NH 2.1.2.GA a pretty interesting. The question you should ask is "Do I require those new features, or should they be useful for future expansion of my project?" If yes, then go for it, otherwise, keep it the way it works.

Will Marcouiller
+5  A: 

If performance is your problem, consider using the NHibernate Profiler.

NHibernate Profiler is a real-time visual debugger allowing a development team to gain valuable insight and perspective into their usage of NHibernate.

Anthony Mastrean
I second that, fixed a lot of problems using this tool.
pmlarocque
+2  A: 

Having done the conversion from 1.2 to 2.0.1 and then to 2.1.2 i can solidly say that i wouldn't go back.

The MultiCriteria implementation was a game changer for me (both for performance and coding style). Second Level cache is probably the same with 1.2 and for Join Table i'm not using them so i can't comment.

The improvements are across the board, and certain parts have been re-written. Nothing got broken, except same namespace changes and classname changes, functionality was the same. Overall i recommend it.

Jaguar