-->
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.  [ 9 posts ] 
Author Message
 Post subject: SQLite Performance problem
PostPosted: Mon Jun 12, 2006 9:14 am 
Newbie

Joined: Mon Jun 12, 2006 9:08 am
Posts: 6
Location: Argentina
Hi
I have a big problem with sqlite performace (I have this problem with ms access too).
When i run my application with vs 2003 ide (in debug or release mode) it took much time to permorm a query.
For example, it took 45 seconds (yes! 45 seconds!!!) to retrive 38 objects and when i run directly the exe file (or run tests with testdriven using "test with debugger"), it took less than 1 second.

I don't know what to do!!
Thanks!!


Top
 Profile  
 
 Post subject: Re: SQLite Performance problem
PostPosted: Mon Jun 12, 2006 9:20 am 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
DamnGoodCoffee wrote:
Hi
I have a big problem with sqlite performace (I have this problem with ms access too).
When i run my application with vs 2003 ide (in debug or release mode) it took much time to permorm a query.
For example, it took 45 seconds (yes! 45 seconds!!!) to retrive 38 objects and when i run directly the exe file (or run tests with testdriven using "test with debugger"), it took less than 1 second.

I don't know what to do!!
Thanks!!


Check the "output" window of Visual Studio. Maybe the NHiberrnate is sending exessive amount of log messages to console or debug output..

Gert

_________________
If a reply helps You, rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 9:56 am 
Newbie

Joined: Mon Jun 12, 2006 9:08 am
Posts: 6
Location: Argentina
Quote:
Check the "output" window of Visual Studio. Maybe the NHiberrnate is sending exessive amount of log messages to console or debug output..


there are much message to debug output, maybe that is the problem. How can I fix that? my log4net configuration is

<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} %m%n" />
</layout>
</appender>
<appender name="rollingFile" type="log4net.Appender.RollingFileAppender, log4net" >
<param name="File" value="Explora_Log.txt" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value=" yyyy.MM.dd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout, log4net">
<param name="ConversionPattern" value="%d %-5p %c{2} %m%n" />
</layout>
</appender>
<logger>
<level value="WARN" />
<appender-ref ref="FileAppender" />
</logger>
<root>
<level value="INFO" />
<appender-ref ref="ConsoleAppender" />
</root>
</log4net>

Thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 10:02 am 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
DamnGoodCoffee wrote:
<log4net>
<root>
<level value="INFO" />
<appender-ref ref="ConsoleAppender" />
</root>
</log4net>


This tells that every possible message logged should be sent to console. Try something more restrictive than "INFO"

Gert

_________________
If a reply helps You, rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 10:08 am 
Newbie

Joined: Mon Jun 12, 2006 9:08 am
Posts: 6
Location: Argentina
i watched the degug window and i realize that it's sending each message 14 times! now, i config log4net yo log error messages (level value="error") and still the same

For example:

222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac
222875 [2456] DEBUG NHibernate.Loader.Loader (null) - result row: 1e76662d3c7042c0b72d83a38f008fac


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 10:15 am 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
DamnGoodCoffee wrote:
i watched the degug window and i realize that it's sending each message 14 times! now, i config log4net yo log error messages (level value="error") and still the same


I haven't done much configuration of log4net, so i can't says what's wrong here... Maybe someone else can help.

But what about NHibernates show_sql. Is it true or false?

Gert

_________________
If a reply helps You, rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 10:35 am 
Newbie

Joined: Mon Jun 12, 2006 9:08 am
Posts: 6
Location: Argentina
mhhhh
I been reading some posts about performance and it seems like someone had the same problem and solved it

Quote:
Copy the log4net configuration in "nhibernate/src/NHibernate.Examples/App.config"
(replace the line "<priority value="ALL" />" by "<priority value="WARN" />")

You don't need to call "DOMConfigurator.Configure()" if you don't use Log4Net (NHibernate call it internally)


but i can't find nhibernate/src/NHibernate.Examples/App.config

about show_sql property, it's false

Code:
cfg.SetProperty( "hibernate.show_sql", "false" );

it's right?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 10:35 am 
Newbie

Joined: Mon Jun 12, 2006 9:08 am
Posts: 6
Location: Argentina
mhhhh
I been reading some posts about performance and it seems like someone had the same problem and solved it

Quote:
Copy the log4net configuration in "nhibernate/src/NHibernate.Examples/App.config"
(replace the line "<priority value="ALL" />" by "<priority value="WARN" />")

You don't need to call "DOMConfigurator.Configure()" if you don't use Log4Net (NHibernate call it internally)


but i can't find nhibernate/src/NHibernate.Examples/App.config

about show_sql property, it's false

Code:
cfg.SetProperty( "hibernate.show_sql", "false" );

it's right?

but still shows me sql statements in the debug window


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 1:29 pm 
Newbie

Joined: Mon Jun 12, 2006 9:08 am
Posts: 6
Location: Argentina
:D
i solved the problem. It was configuring log4net several times (each factory configurates it) and it was logging the same several times
Thanks a lot for the support!!
you are great!


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