Improving the performance of an nHibernate Data Access Layer.

Posted by Amitabh on Stack Overflow See other posts from Stack Overflow or by Amitabh
Published on 2010-04-18T13:49:26Z Indexed on 2010/04/18 13:53 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

I am working on improving the performance of DataAccess Layer of an existing Asp.Net Web Application. The scenerios are.

  1. Its a web based application in Asp.Net.
  2. DataAccess layer is built using NHibernate 1.2 and exposed as WCF Service.
  3. The Entity class is marked with DataContract.
  4. Lazy loading is not used and because of the eager-fetching of the relations there is huge no of database objects are loaded in the memory. No of hits to the database is also high. For example I profiled the application using NHProfiler and there were about 50+ sql calls to load one of the Entity object using the primary key.
  5. I also can not change code much as its an existing live application with no NUnit test cases at all.

Please can I get some suggestions here?

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about Performance