Re: [Hibernate] Startup time

2004-04-29 Thread Emmanuel Bernard
Hibernate read every single property of the DOM and use context/hierarchy a lot. rewriting it in SAX will lead to : - a *full* rewriting of Binder (not a fast job believe me) - not sure SAX is faster when you need to read the whole document. Ara Abrahamian wrote: 1/3rd of the total startup time

RE: [Hibernate] Startup time

2004-04-29 Thread Lendvai Attila
: > From: [EMAIL PROTECTED] :: > [mailto:[EMAIL PROTECTED] On :: > Behalf Of Gavin King :: > Sent: Wednesday, April 28, 2004 10:22 PM :: > To: Ara Abrahamian :: > Cc: 'hibernate-devel' :: > Subject: Re: [Hibernate] Startup time :: > :: > :: > That would res

Re: [Hibernate] Startup time

2004-04-28 Thread Ashish Kulkarni
How about using the jakarta commons-digester? I believe it uses SAX, and it makes your code a LOT more readable :-) (ps. can someone modify the list settings so that the reply goes to the list? that'd help a lot ...) Gavin King wrote: > That would result in a LOT of really ugly code. > > Ar

RE: [Hibernate] Startup time

2004-04-28 Thread Joshua Davis
At best, a LOT of code. Ugliness can be left up to the developer. ;) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Gavin King > Sent: Wednesday, April 28, 2004 10:22 PM > To: Ara Abrahamian > Cc: 'hibernate-devel&

Re: [Hibernate] Startup time

2004-04-28 Thread Gavin King
That would result in a LOT of really ugly code. Ara Abrahamian wrote: 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 by just using SAX instead of dom4j. Ara. -

RE: [Hibernate] Startup time

2004-04-28 Thread Marek Mosiewicz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin King Sent: Wednesday, April 28, 2004 2:25 AM To: Henri Tremblay Cc: 'hibernate-devel' Subject: Re: [Hibernate] Startup time Gavin King wrote: >>2- Lazy load the conf. I mean, don&#

RE: [Hibernate] Startup time

2004-04-28 Thread Lendvai Attila
:: The CGLIB stuff will probably be hard to work around since :: those objects :: are not (and probably can't be made) serializable - :: but we can remove the XML parsing if we can serialize the :: SessionFactory...but it will probably require us to keep more state :: around than we did previou

Re: [Hibernate] Startup time

2004-04-28 Thread Prünte Kai
Hi, like other I also has problems with the start up time. After a short analysis I saw that Xalan for XMLDatabinder takes a lot of time. Special for small projects (less mapping files) the part of XMLDatabinder is very high. Could it be usefull to make XMLDatabinder optional? Kai -

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

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 Gavin King
el' Subject: RE: [Hibernate] Startup time 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-

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 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] St

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 Henri Tremblay
ED]> To: "Ara Abrahamian" <[EMAIL PROTECTED]> Cc: "'hibernate-devel'" <[EMAIL PROTECTED]> Sent: Tuesday, April 27, 2004 5:07 PM Subject: Re: [Hibernate] Startup time > Theres other problems with lazy compilation, its not doable.

Re: [Hibernate] Startup time

2004-04-27 Thread Michael Gloegl
7;Emmanuel Bernard'; Ara Abrahamian Cc: 'hibernate-devel' Subject: RE: [Hibernate] Startup time 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,

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 d

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 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 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 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 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