Unfortunately it is a legacy application with a legacy database that we do not have the time to rework. No greenfield work here. :( I agree it is a large waste of resources, but it is what it is. I'm actually not doing any loading of data at this point. Everything is setup to be lazy from what I understand, even the domain objects.
This call is where memory goes from ~18 MB to ~165 MB: sessionFactory = configuration.BuildSessionFactory(); I do keep the session open for an application/process right now. How can I guarantee that everything is lazy loaded? Thanks, Kyle On May 16, 10:16 am, Ramon Smits <[email protected]> wrote: > I agree with José. > > :-) > > But... why on earth are you spawning that much applications that all access > the same database? Isn't that an awful waste of resources? > > Besides that.. the whole purpose of NHibernate is to dynamically load your > domain entities when needed via lazy loading. Seems to me that you are not > using lazy loading and immediately load all data in memory. > > Are you keeping your sessions alive? As you should not do this. > > If you are fairly new then start with a small application and do not > immediately start with such a huge model! When I hear you are having tables > with more then 100 columns... spawning hundreds of process... dude.. your > problem really is not anything related with NHibernate...... > > -- > Ramon > > On Mon, May 16, 2011 at 4:57 PM, José F. Romaniello > <[email protected]>wrote: > > > > > > > > > > > 2011/5/16 Kyle <[email protected]> > > >> I may have to look at EF4 or some > >> other solution that uses less memory. > > > Yes, that is a good idea! > > Would you mind to re-map your 400 domain objects with EF, and when your > > application is all running in the same way than with nhibernate, tell us the > > result about memory consuption? > > It will be really really nice if you can write a blog-post or something > > with a comparisoon. > > > thanks, > > > -- > > You received this message because you are subscribed to the Google Groups > > "nhusers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. > > -- > Ramon -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
