-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Optimizing reflection optimization
PostPosted: Tue May 25, 2010 8:53 am 
Newbie

Joined: Tue May 25, 2010 6:40 am
Posts: 2
Location: Estonia
Recently my task involved enabling hibernate reflection optimization in our application.

Versions used:
hibernate-core-3.3.1.GA
javassist-3.4.GA

I have collected some ideas/comments during this work and I hope they will help to improve the product.

1. I think this was already pointed out, but Hibernate documentation still misguides people to use the no-longer supported hibernate.cglib.use_reflection_optimizer property in Table 3.7. Miscellaneous Properties. The real name for the property is: hibernate.bytecode.use_reflection_optimizer.

2. I have noticed that org.hibernate.bytecode.javassist.BulkAccessorFactory.findAccessors(...) is searching for accessor methods in the optimized entity class only. This means that the methods from the superclasses are not visible during BulkAccessor creation unless overridden by child classes. By enhancing the algorithm to search down the inheritance tree we could avoid creation of redundant methods which increase the code verbosity a lot. In our case almost all the entities are inherited from the base classes having the common entity properties defined, so the reflection optimization does not work for any of them until we override the inherited methods in all the child classes. The implementation is trivial, but I have got a ready prototype if anybody is interested.

3. It seems that it should be also fairly easy to optimize the EntityTuplizer's getPropertyValue and setPropertyValue calls in the similar way how the getPropertyValues and setPropertyValues are currently optimized.

Since I am a newcomer I would like to ask what is the most efficient way to make these changes be implemented in the future releases of Hibernate?


Top
 Profile  
 
 Post subject: Re: Optimizing reflection optimization
PostPosted: Tue May 25, 2010 9:24 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello,
Quote:
Since I am a newcomer I would like to ask what is the most efficient way to make these changes be implemented in the future releases of Hibernate?

Subscribe to the developer's mailing list and write there to propose new changes; forum is to assist users only as not all developers can possibly read all posts, there are way too much.
http://www.hibernate.org/community/mailinglists.html

Especially please write soon about points 2) and 3) which look like interesting improvements, they might be included quickly if there are no drawbacks.

About 1) please open a new issue on JIRA and assign it to me (sannegrinovero), I'll fix it soon.
(seems trivial enough to not need discussion on dev-list)
http://opensource.atlassian.com/projects/hibernate/browse/HHH

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Optimizing reflection optimization
PostPosted: Tue May 25, 2010 10:12 am 
Newbie

Joined: Tue May 25, 2010 6:40 am
Posts: 2
Location: Estonia
I have created HHH-5259 to fix the config property name. Could not assign it to you however.


Top
 Profile  
 
 Post subject: Re: Optimizing reflection optimization
PostPosted: Tue May 25, 2010 10:56 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
thank you very much

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.