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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate startup time - performance issue.
PostPosted: Fri Nov 28, 2003 10:46 am 
Newbie

Joined: Fri Nov 28, 2003 10:38 am
Posts: 19
We are having some performance issue when using Hibernate 2.x. The performance is quiet poor to a map few mapping files and getting session factory.

1. instantiate Configuration.
2. add resources (say dozen mapping files).
3. create sessionfactory.


I am using p4/2.5 ghz, 1 mb ram.. the above process takes around 8secs... is it the expected behaviour?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 28, 2003 12:27 pm 
Newbie

Joined: Tue Nov 25, 2003 5:05 pm
Posts: 18
It always depend how you've configured hibernate. How many "a few" is. What kind of database driver you use. How many classes you map. Maybe you are hitting some nameservice timeout etc.
I'm using hibernate to map around 30 classes (all in one mapping file) and startup is roughly 1s (Athlon XP 2800+, 2GB RAM, WinXP, java 1.4.2_02). If restart hibernate in the same JVM to give hotspot a chance startup takes around 100ms.

ciao
Sven

PS: Maybe 1MB ram is a bit less ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 28, 2003 12:33 pm 
Newbie

Joined: Fri Nov 28, 2003 10:38 am
Posts: 19
a few -> dozen mapping files(i.e hbm.xml) (30 classes)
Using Oracle 9i jdbc drivers...

no application server used. This is a standalone application talking to a oracle database.

Note: memory is 1GB..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 28, 2003 12:58 pm 
Regular
Regular

Joined: Fri Sep 05, 2003 12:01 am
Posts: 80
Location: Bogot
Im curious to see how hibernate performs with Oracle!

I run unittests to wrap around 15 classes and my sessionfactory is bound to an sqlserver in another computer. All in all it startsup in less than 3 sec.

Maybe you should use IP's in the URL so as to avoid DNS lookups and stuff.. but 10 secs seems like a lot of time to me, just to initialize!

How does it perform once it's up?

_________________
Mauricio Hern


Top
 Profile  
 
 Post subject: Re: Hibernate startup time - performance issue.
PostPosted: Fri Nov 28, 2003 1:06 pm 
Newbie

Joined: Tue Nov 25, 2003 5:05 pm
Posts: 18
rajesh_r_j wrote:
1. instantiate Configuration.
2. add resources (say dozen mapping files).
3. create sessionfactory.


Please post some timings of 1,2 and 3.
e.g. for 1:
Code:
  int start = System.currentTimeMillis();
  instantiate_Configuration();
  int stop = System.currentTimeMillis();

  System.out.println (stop-start);


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