Hello,
I'm working on a big Winform .Net application (framework 2) and I use NHibernate 1.2 (big big thanks to the hibernate team, this product is really fantastic !!!!).
Well, regarding my application, I'm now facing big performance issues and I guess it's because I'm not using NHibernate in the right way :(
I've read the documentation several times, but I suppose there are some key sections that I'm not understanding properly. That's why I'm creating this topic on the forum.
First of all, in my project, I'm using one single Session, created when the user logs in and closed when the application is closed. So this session may be used during several hours. I think I should not do that, but else I've problems to load lazy collections. The session is in "commit" flush mode.
I discovered that when I load multiple objects of persistent type "Class1", and the I try to update 1 single object of persistent type "Class2", Nhibernate reads all (?) the properties of all Class1 objects, even if there are actually no relation between Class1 and Class2.
I suppose it's because my single session checks if any of its objects has been updated ? The problem is that it takes a lot of time to check that.
So, is there a way to "disable" theses checks ? Or should I stop using 1 single session ?
I hope I explained the issue clearly enough :)
Thanks in advance for your support,
Mikvix
|