<add key="hibernate.use_reflection_optimizer" value="false"/>
The solution was found here. Our startup is finally a fast one! We are now going to test our integration tests against this option to figure out the impact. One thing's for sure: on our development environments, this is definitely the best option.
Diogo Henriques, as our NHibernate guru, has also proposed an alternative approach: serializing the configuration. I'll post the results as soon as we get them.
Are you using NHibernate 1.0.2 or 1.2? Our NHibernate startup used to be slow for me with 1.0.2. If I add the key="hibernate.use_reflection_optimizer" value="false", it helps. With NHibernate 1.2, I am not seeing any startup gain with this setting. Version 1.2 starts up much faster for me than 1.0.2.
ReplyDelete