[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1258?page=all ]
Tyler Van Gorder updated HHH-1258:
----------------------------------
Attachment: SessionFactoryImpl.patch
Here is a patch for the modified session factory implementation against the 3.2.0.cr4
release.
One additional note, as I got about half way into this implementation it occurred to me
that a better place to perhaps delay the loading of the configuration might be in the
persisters themselves. (Construct them all, but not instrument them in the initialization
but rather the first time they are touched.) This would theorically be more thread safe,
but I didn't dive into this approach as I was already half way through the session
factory changes.
Thanks.
Tyler.
startup time improvements
-------------------------
Key: HHH-1258
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1258
Project: Hibernate3
Type: Improvement
Components: core
Versions: 3.1 rc3
Reporter: Max Rydahl Andersen
Assignee: Max Rydahl Andersen
Attachments: SessionFactoryImpl.java, SessionFactoryImpl.patch
while doing some basic startup perf testing the following were found - this issue is
mainly to track what I find, and then fix it:
Initial tests where 100 classes, 30 sec for buildSessionFactory
setting hibernate.cglib.use_reflection_optimizer false and it is 10 sec for
buildSessionFactory.
(maybe we should autodetect which jdk we are running on and disable it per default for
1.4/1.5 - needs to validate runtime impact)
Another (22%) time stealer is the discovery of getter/setters - in worst case it iterates
over all declared methods per property.
(alternatively we could cache/sort this list or make a more efficient implementation if a
class only contain default property accessors)
Other 20% of the time is done in net.sf.cglib related classes for build time
enhancement.
The rest of the time is Configuration creation (can be cached) and other iteration code.
(p.s. don't take the % numbers as hard values - these are definitly affected by how
many methods/classes you have; this underlying tests
is done on pojos with a "high" method count (approx 100)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira