[Hibernate] Startup time

2004-04-27 Thread Gavin King
OK, I start to hear complaints about the startup time of Hibernate almost everywhere I go now. It's an important issue, because it's a problem that gets worse as people's applications get bigger, and it's something that slows down developers. If there's /anything/ we are about, it is about incr

Re: [Hibernate] Startup time

2004-04-27 Thread Emmanuel Bernard
Use a tool like OptimizeIt or JProbe. Pure JVM timing is useless due to timer approx. Michael Gloegl wrote: Hi, Max is trying to implement serialization of the SessionFactory, as one possible solution, but perhaps there is some other way we could optimize stuff. Does someone want to profile Hib

Re: [Hibernate] Startup time

2004-04-27 Thread Michael Gloegl
Hi, Max is trying to implement serialization of the SessionFactory, as one possible solution, but perhaps there is some other way we could optimize stuff. Does someone want to profile Hibernate startup, and discover where the slow methods are? At least find out which work is dominating at star

RE: [Hibernate] Startup time

2004-04-27 Thread Ara Abrahamian
Most probably loading the hbm files and creating metadata objects is the bottleneck? And the solution is to lazy load them? Ara. > -Original Message- > From: [EMAIL PROTECTED] [mailto:hibernate-devel- > [EMAIL PROTECTED] On Behalf Of Gavin King > Sent: Tuesday, April 27, 2004 12:43 PM > T

Re: [Hibernate] Startup time

2004-04-27 Thread Emmanuel Bernard
No this is impossible: we need a second pass compilation. And "from Object" request the whole mapping to work as expected Ara Abrahamian wrote: Most probably loading the hbm files and creating metadata objects is the bottleneck? And the solution is to lazy load them? Ara. -Original Messa

Re: [Hibernate] Startup time

2004-04-27 Thread Gavin King
Theres other problems with lazy compilation, its not doable. Ara Abrahamian wrote: Most probably loading the hbm files and creating metadata objects is the bottleneck? And the solution is to lazy load them? Ara. -Original Message- From: [EMAIL PROTECTED] [mailto:hibernate-devel- [EMAI

RE: [Hibernate] Startup time

2004-04-27 Thread Ebersole, Steve
This did not seem to go through the first time around. Here goes again... -Original Message- From: Ebersole, Steve Sent: Tuesday, April 27, 2004 10:05 AM To: 'Emmanuel Bernard'; Ara Abrahamian Cc: 'hibernate-devel' Subject: RE: [Hibernate] Startup time I can do that. I'll run it thro

Re: [Hibernate] Startup time

2004-04-27 Thread Michael Gloegl
Hi, I'll have a look with OptimizeIt and hprof, too ... the more the merrier :) Michael Ebersole, Steve wrote: This did not seem to go through the first time around. Here goes again... -Original Message- From: Ebersole, Steve Sent: Tuesday, April 27, 2004 10:05 AM To: 'Emmanuel Bernar

Re: [Hibernate] Startup time

2004-04-27 Thread Henri Tremblay
Happily, I'm currently having this problem on my project. It takes ages to load the configuration (more than one minute at least). So I played with OptimizeIt quickly. Our real problem was a little bit tricky (it's based on a special enum implementation we have, we have one custom type per enum ty

Re: [Hibernate] Startup time

2004-04-27 Thread Michael Gloegl
Hi all, here are some quick shot results using hprof (I'll do some more detailed examination as soon as I have OptimizeIt access again): For testing, I did a simple SessionFactory building on all the mappings from the Unit tests. (except 4). In the default configuration, the rough approximatio

RE: [Hibernate] Startup time

2004-04-27 Thread Ebersole, Steve
I can do that. I'll run it through both JProbe and OptimizeIt... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Emmanuel Bernard Sent: Tuesday, April 27, 2004 8:41 AM To: Ara Abrahamian Cc: 'hibernate-devel' Subject: Re: [Hibernate] Startup time No this

Re: [Hibernate] Startup time

2004-04-27 Thread Gavin King
Henri Tremblay wrote: One other thing that takes time is reflection. I don't know if some calls to ReflectHelper can be replaced by static code but it would help. Hum, would be interesting to see if startup is faster when all types are specified in the mapping. I guess it would then also be p

Re: [Hibernate] Startup time

2004-04-27 Thread Gavin King
Thanks Steve and Michael. Ebersole, Steve wrote: This did not seem to go through the first time around. Here goes again... -Original Message- From: Ebersole, Steve Sent: Tuesday, April 27, 2004 10:05 AM To: 'Emmanuel Bernard'; Ara Abrahamian Cc: 'hibernate-devel' Subject: RE: [Hibernat

Re: [Hibernate] Startup time

2004-04-27 Thread Max Rydahl Andersen
Michael Gloegl wrote: Hi all, here are some quick shot results using hprof (I'll do some more detailed examination as soon as I have OptimizeIt access again): For testing, I did a simple SessionFactory building on all the mappings from the Unit tests. (except 4). In the default configuration,

RE: [Hibernate] Startup time

2004-04-27 Thread Ara Abrahamian
> > 1/3rd of the total startup time goes to Configuration.addInputStream, > > nearly completely to dom4j.io.SaxReader.read Perhaps someone could migrate the xml loading stuff to use SAX instead of dom4j? Dom4j creates lots of objects. In my backup/restore code I saw a 10 times better performance b