[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1258) startup time improvements

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Wed Nov 29 05:18:05 EST 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1258?page=comments#action_25461 ] 

Max Rydahl Andersen commented on HHH-1258:
------------------------------------------

Hi Mike,

Thanks for the (upcoming) patches - if you could add them as one in a zip or one big patch then it becomes much easier to maintain.

Regarding your downsides:

#1: keeping PersistentClass is not optimal, but I guess it is "ok" and the users can avoid any issues when reusing the configuration is to serialize/deserialize the configuration before using it again. (there are also issues with this if you e.g. register specifc event listener instances)

#2: yes, a synchronization is probably needed here and in javaassist (does your patch work with javassist too or ?)

#3: i don't follow this one...?

again, i'm very interested in this issue and we are getting closer to something that could be an *option* to support but needs some more digging/verification to put it in core.

> 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: AbstractEntityTuplizer.patch, Environment.patch, 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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list