Hi Max,
Couple of months ago we were evaluating the use of Hibernate, and were ran some performance comparisons between popular ORM tools. One of the things we noticed is that serialization of lazy initialization poxies is time consuming.
Meaning ? In Hibernate a non initialized proxy should not be slow to serialize,
but a initialized one is of course just as slow as a fully initialized object....
Aren't you just seeing these as time consuming because these are the objects
you have the most of and that if they were not lazy objects they would still
be there as hotspots just as ordinary serialization is.
I admit that when using Hibernate entities as DTOs the proxy fields should be nulled out, ideally.
I don't think they should be nulled out...
But what we would like to understand is, in your tests have you noticed this before? If so, what kind of impact does it impose on serialization of entities?
my current focus has been startup time and here the primary timestealer is as written xml reading and that can be improved imensly by simple using serialization - next after it is the classloading that takes time (because hibernate need to identify these classes up front)
I haven't seen that serialization of lazy objects should be heavier than expected
(meaning similar as normal objects + in collections their might be more to transport
than normal since we need to track what has been deleted/inserted....but that is nothing
different that what you yourself should have done if working without hibernate)
If you have measurements that show otherwise then I would be interested in seeing them...(including
of course the code that you measured on ,)
/max
Thanks, Binil
PS: We chose to go with Hibernate, BTW :-)
On Sun, 26 Dec 2004 22:30:03 +0100, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:Hi guys,
Just reran a set of startup performance tests, to see if something has changed or I would be able to point out some new places to put in some speedups. Unfortunately (or as expected) not much has changed.
The same pattern always emerge on startup performance:
#1. xml reading is 40-60% if one doesnt use the serialized version...so
use addCachableFile() to do an EASY performance boost!
#2. FastClass creation takes 23% (when using serialized xml files). After
looking at the source I could see that fastclass is ONLY
needed when the cglib optimizer is used, so I removed creation of
fastClass'es.
The "funny" thing is that I don't think it makes any difference since
after removing this ClassLoader and normal reflection popped up
as using approximate the same time. (hinting that FastClass just
triggered that in a different way). So disabling cglib optimizer might not
give that much of a boost..my emperi hints it's <5%)
#3. After #1 & #2 the biggest time-stealer is reflection and classloading.
(nothing much to do about this except not adding classes not needed to
the configuration)
So, caching the classes generated by cglib I do not think will matter much
since it will be replaced with classloading.
The next step I see is lazy creation of EntityPersisters and/or trying to
serialize the actual SessionFactory (but that is a tough one - since to
alloew deserializing parts of the persisters, loaders, caches etc. need
access to stuff only available in SessionFactory which they don't all have
access to)
-- Max Rydahl Andersen callto://max.rydahl.andersen
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
-- Max Rydahl Andersen callto://max.rydahl.andersen
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel