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.  [ 2 posts ] 
Author Message
 Post subject: BuildSessionFactory problem...
PostPosted: Thu Jul 06, 2006 5:13 am 
Beginner
Beginner

Joined: Thu Jul 06, 2006 4:44 am
Posts: 31
Hi all.

I have a database with like 34 tables. With optimizer turned on it takes aprox. 11 sec. to build the session factory. Otherwise something like 8 sec. Some people wrote here that it is not so bad because this is done only once? Even if it is done only once it is to long for any serious application. The user must wait 11 seconds or more each time for the application to start to be able to use the db?

First of all my application has toolbar with the function to browse the database which is available on the application startup. Though using nhibernate the user can't use the database browser before the factory is build up (even if building the factory in the background). Further the user can choose between couple database vendors. So does it means each time he changes the database he must wait another 11 sec.?

Considering that the database schema does not change so radically is there no other way to store the created factory like serialization or make it predefined (whatsoever)?

Can someone help me on this issue please. Or just to abandon object mapping and user hibernate for standard queries?

(And i'm bound to .NET 1.1 at this time)

Tanks
Igor


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 9:51 am 
Beginner
Beginner

Joined: Tue May 17, 2005 7:25 pm
Posts: 43
Location: Somewhere, USA
You have three options:

1. Re-architect your application to work around this issue.

2. Using NHibernate 1.0.2 - Turn off the optimizer. That's the only to avoid that startup penalty.

3. Using Nhibernate 1.2 Alpha (.NET 2.0 ONLY) - Use the new lightweight code generation reflection optimizer. This version doesn't have the startup penalties like the previous version.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.