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

Improve CacheOperation equals/hashCode implementation performance [SPR-13970] #18542

Closed
spring-projects-issues opened this issue Feb 22, 2016 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Feb 22, 2016

Khaled Ayoubi opened SPR-13970 and commented

"CacheAspectSupport" tries to get a cached version of "CacheOperationMetadata" from "metadataCache" using "CacheOperationCacheKey" as a key

"CacheOperationCacheKey.equals" method calls "CacheOperation.equals" which calls "toString" which is pretty expensive, if I'm in large loop and hitting the cache, I can notice considerable degradation in performance


Affects: 4.2.4

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

This is actually fixed (see #957). If you could give 4.3.0.BUILD-SNAPSHOT a try and confirm this fixed the issue for you, that'd be nice!

@spring-projects-issues
Copy link
Collaborator Author

Khaled Ayoubi commented

this brought down the 2000+ cache hit time from ~700ms to ~200ms! if i have the same data in local map the time is ~30ms, is that expected ?

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

What is expected? If you have questions, please ask them on Stackoverflow; I really don't see the link with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants