Improving the performance of an nHibernate Data Access Layer.
- by Amitabh
I am working on improving the performance of DataAccess Layer of an existing Asp.Net Web Application. The scenerios are.
Its a web based application in Asp.Net.
DataAccess layer is built using NHibernate 1.2 and exposed as WCF Service.
The Entity class is marked with DataContract.
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.
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?