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: NHibernate 1.0.2 buildsessionfactory slow !
PostPosted: Thu Sep 28, 2006 3:29 am 
Newbie

Joined: Wed Sep 27, 2006 2:54 pm
Posts: 15
hi all,

i am using NHibernate 1.0.2 , but it's BuildSessionFactory method takes about 30-40 second to complete it while NHibernate 1.0.0 just tooks about 2-3 seconds.

Code:
cfg = new Configuration();

cfg.SetProperty("hibernate.dialect", "NHibernate.Dialect.SQLiteDialect");
cfg.SetProperty("hibernate.connection.provider", "NHibernate.Connection.DriverConnectionProvider");
cfg.SetProperty("hibernate.connection.driver_class", "NHibernate.Driver.SQLiteDriver");
cfg.SetProperty("hibernate.connection.connection_string", @"Data Source=" + GetDatabaseName() + ";Version=3");
cfg.SetProperty("hibernate.query.substitutions", "true=1;false=0");

try
{
       cfg.AddAssembly("WindowsApplication1");
       factory = cfg.BuildSessionFactory();
}



is there any configuration needed to make it faster ??


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 8:13 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, set hibernate.use_reflection_optimizer to false.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 01, 2006 6:35 am 
Newbie

Joined: Wed Sep 27, 2006 2:54 pm
Posts: 15
tnx for reply sergey.

but which one is better ?? using the optimizer or not using it ?? if i set it to false , is it affect on any performance of nhibernate ???


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.