These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: BuildSessionFactory performance (NH 2.1.2)
PostPosted: Fri May 21, 2010 5:21 am 
Newbie

Joined: Fri May 21, 2010 5:12 am
Posts: 2
Hi,
my application cotain about 50 entities. The BuildSessionFactory needs on applicationstartup in the meantime up to 10 seconds!!
Code:
Configuration cfg = new Configuration();
cfg.Configure(sessionFactoryConfigPath);
sessionFactory = cfg.BuildSessionFactory();


I tried to copy all XML-Mapping files into one file which saves about 1 second on startup. How can I improve the startup process?
Thx 4 any suggestions.


Top
 Profile  
 
 Post subject: Re: BuildSessionFactory performance (NH 2.1.2)
PostPosted: Fri May 21, 2010 6:34 am 
Beginner
Beginner

Joined: Fri Feb 27, 2009 6:07 am
Posts: 38
Location: Moscow,Russia
You can Serialize and Deserialize Configuration.


Top
 Profile  
 
 Post subject: Re: BuildSessionFactory performance (NH 2.1.2)
PostPosted: Fri May 21, 2010 9:01 am 
Newbie

Joined: Fri May 21, 2010 5:12 am
Posts: 2
kir wrote:
You can Serialize and Deserialize Configuration.

Thank you!
Nice idea, works fine and saved me about 4 seconds... any more suggestions? Especially for the BuildSessionFactory?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.