Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance - hashCode method of AbstractFallbackTransactionAttributeSource.DefaultCacheKey doesn't take targetClass into account [SPR-12536] #17141

Closed
spring-projects-issues opened this issue Dec 11, 2014 · 1 comment
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 11, 2014

Victor Bronstein opened SPR-12536 and commented

In commit 57eedf3 Juergen Hoeller has simplified the hashCode function of this class to use the method only and ignore the targetClass field. This causes a performance degradation because all methods inherited from java.lang.Object map to the same hash (thus falling into the same bucket) but return false when compared (targetClass differs). Therefore the price of getting a value from the attributeCache rises considerably which given the enormous amount of calls to getTransactionAttribute creates a performance degradation.


Affects: 3.2.7, 4.1.3

Issue Links:

Backported to: 4.0.9, 3.2.13

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This has been addressed for 4.1.4, 4.0.9 and 3.2.13 now, all scheduled for release next week.

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.1.4 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants