We're developing an enterprise level application with a complex database schema and some very large tables. We used a tool to autogenerate all our entities, where every foreign key produces a many-to-one association. As you can imagine, the first time I attempt to load an entity, it takes up to 15 seconds to load all of the proxies throughout the resulting tree of entities, and I'm pretty sure the majority of that time is in the Castle's DynamicProxy logic.
So, I know we can definitely speed this up if we take out some of the unnecessary associations, but is there a way for us to bypass this proxy generation logic? It appears that NHibernate doesn't support the lazy="no-proxy" setting (if that would even be the answer), and when I play with proxy interfaces defined on the class, the DynamicProxy logic is still invoked (and there's really no good help as to _why_ you would ever define your own proxy interface).
Thanks in advance,
Ross
|