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
|