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 approximation is:
Of the time spent for the whole session factory building:
1/6th is spent for cglib.proxy.Enhancer.create (via CGLIBProxyFactory.postInstantiate)
1/7th is spent on cglib.beans.BulkBean.create and cglib.reflect.FastClass.create
This both happens in the call hierarchy of PersisterFactory.createClassPersister, which accounts to roughly half of the startup time (so mostly reflection and cglib here)
1/3rd of the total startup time goes to Configuration.addInputStream, nearly completely to dom4j.io.SaxReader.read
These times matches the timings I did previously to see what/where serialization would/could be a beneficial solution for this.
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 previously to be able to rebuild the CGLIB stuff.
...and "easier" solution would be to make Configuration serializable and just rebuild the sessionfactory from there instead...should I focus on making Configuration serializable instead ? (I even think we got a patch for it somewhere)
/max
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel