Hi,
I have a rather complex Object Graph that consists of 44 classes. All classes are mapped with Hibernate XML Mapping files (with cascade relationships and the usual meta tags for equals and toString). All classes are rather small (about 12 properties on average).
It takes about 5 seconds to create the SessionFactory ( I use the "standard" HibernateUtil to create it). It is never faster than 4 seconds and sometimes it even takes about 7 seconds.
Is this normal for 44 classes? This is the first time I use Hibernate for a Swing desktop application. If I would be on a server these 5 seconds would not really bother me but for a desktop application 5 extra seconds to start an application is annoying.
I've already tried the performance Tips on:http://www.hibernate.org/194.html
The serialization helps a little bit and I dont get the 7 seconds worst case anymore. But still I think parsing 44 small XML Files should be faster.
Any suggestions? Would Annotations be faster for example?
I use:
Hibernate 3.2.6.ga
Windows XP Professional SP2
On a dual core with 1 Gig RAM
best regards,
Christian
|