These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Time consuming building of proxy-classes
PostPosted: Tue Sep 02, 2008 11:29 am 
Newbie

Joined: Thu Aug 21, 2008 8:40 am
Posts: 4
Hi,

I've to cope with a kind of legacy data. The object model is quite huge (about 1000 classes, generated with a self-made code generator). Almost all classes do have bag-references to other classes. So far so good, everything works fine.

But there are some classes which have more than a handful of bag-references. Some of them have about 80 (!) bag-references to other classes.
Wisely, I'm using lazy-loading. ;) But nevertheless there comes a performance problem with that instance: NHibernate creates for each of the bag-collection a proxy-class via Castle (I've seen that by debugging the NHibernate code) and that can be quite time-consuming for that kind of classes.

Example: Main object A has got a reference to B and B has got a high amount of bag-references. B is loaded via lazy load through A.
When A is loaded, everthing is fine. But when B is loaded lazily, NHibernate creates all the Proxyclasses for each bag-reference. Thats time consuming and takes several seconds.

As there are several classes with so many bag-references, it takes about 15 seconds to load data for one mask. That's ugly, isn't it?

My question: Is there a possibility to avoid the building of all these proxyclasses? Or is there maybe another way of coping with these bag-references?

I'm using NHibernate 1.2.1.

Or ANY other idea? This could be a show-stopper for the nhibernate project... :/

Thanks a lot,
aggn


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 4:47 am 
Newbie

Joined: Thu Aug 21, 2008 8:40 am
Posts: 4
I think I found my problem:

The creating of proxy object was so time consuming, because of the lack of RAM. It seems that my computer was continuesly swapping... On other computers my problem just disappeard. :)

aggn


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.