-->
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.  [ 4 posts ] 
Author Message
 Post subject: question about performance
PostPosted: Sat Jul 23, 2005 1:38 am 
Beginner
Beginner

Joined: Thu May 12, 2005 2:14 am
Posts: 33
Location: Sweden, Sk
Hi

I have a small application which today uses NHibernate, and it have fairly small amount of data. I have some performance problem and to test the performance i did number of small tests.

I tried to load 5000 objects, from a single table, in 3 different ways.
With NHibernate it took 0,77 sec (with log4net turned off)
With datasets, 0,17 sec
Populating the objects from a datareader, 0,14


This small test, doesnt reflect real world queries( outer joins and caching can improve the performance) but the differences are not small. Does the figures makes sence to others who are using NHibernate?

The performance of NHibernate isnt worrying me at this moment but it can become some problem in the future.

Are there some ways I can improve the performance?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 24, 2005 2:24 am 
Regular
Regular

Joined: Mon Jul 18, 2005 4:10 am
Posts: 92
Location: Poland
Hi,
I think you can use legacy sql query in some extraordinary situations (eg. computing complicated report from a huge dataset). NHibernate is still the best in crud-like operations.

_________________
michal


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 4:08 pm 
Beginner
Beginner

Joined: Thu May 12, 2005 2:14 am
Posts: 33
Location: Sweden, Sk
Hi,

Yes this is how I solved the problem I had. But the question remains. Is NH 2-4 times slower than using a dataset? ( I know you can improve the performance by using outer join = true, cache and so on). Myself dont see any problems with thoose figures as NH gives me som much functionality and flexiblity but I think I must have thoose figures in mind when I design my domain model.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 6:03 am 
Regular
Regular

Joined: Mon Jul 18, 2005 4:10 am
Posts: 92
Location: Poland
Hi again,
Faq says "There is not any scientific performance counters from a performance profiling tool" as a reason why NH is still beta , so I think the answer can be hard. I've looked at the test results - performace test seems to be not finished yet - but if it will be done they can say something (case names are promising - AdoNetOnly, HibernateOnly and Simultaneous).
http://nhibernate.sourceforge.net/testresults/NHibernate/Test/PerformanceTest/PerformanceTest.html
Some time ago I've read that (don't remember where,sorry) the overhead caused by Reflection is recompensed by that the queries generated by OR-mapping tool are better optimized than the hand-written ones - so the overall slowness is about 20%.

Perersonaly I have one application using NHibernate and the biggest table has little more than 1000 objects - too small to have a straight opinion. Mayby someone else can say something more.

_________________
michal


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