Hi,
We are currently evaluating Hibernate as our persistence layer for our next big project. This project will be built on a pre-existing enterprise database that has 600+ tables.
As part of the evaulation process we have generated mapping files for about 300+ of those tables.
This is where we run into a potential show-stopper for us:
The startup of the application is taking 40+ seconds. Most of this time is being spent building the session factory, as it appears that the factory is loading and validating all 300+ mapping files. I will have a very difficult time introducing hibernate into our environment (especially in development) when starting the application takes this long. The code/run/debug cycle will simply be unacceptable.
I have switched the mappings to use the addCacheableFile and this has not really improved the performance that much. Again, it appears that most of the time is being spent in the creating of the factory.
Can we cut down on the amount of validation the session factory build is performing on the mappings?
Is there a way to have the factory load the mappings on demand? And if this functionality does not currently exist, how hard would it be to implement this feature in the factory implementation?
Perhaps pre-load all the class/object names and as the objects/classes are encountered by the engine, load their entire definition at that point?
I would really like to leverage hibernate for our next project and projects going forward, but this one issue could put a halt on that.
Thanks for your time.
Tyler Van Gorder
tkv@landacorp.com
Landacorp.
ps. I would be willing to work with someone to help implement this feature, I just simply don't know the internals well enough.