I spent most of the day trying to improve performance on an application. We use NHibernate 2.0 and try to lazy load most of the collections in memory (RAM).
I found these two links very useful for troubleshooting my performance issue:
and the NHibernate reference:
The curious thing is I got really confused when testing my
NHibernateUtil.IsInitialized(_myobject.MyCollection) line and it was false
but I saw a query retrieving the collection in SQL Profiler…
until I realized that adding the collection to the Watch windows in Visual Studio initializes the collection. The same happens if you open the collection in QuickWatch. :-p
The tools used for troubleshooting performance were Ant Profiler and SQL Server Profiler.