CacheAspectSupport 's generateKey method should not concatenate Strings [SPR-12527] #17132
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Kyrill Alyoshin opened SPR-12527 and commented
CacheAspectSupport class has the following line of code at the beginning of its generateKey method:
YourKit shows that this single method call takes about 15% of total time when invoking a "cached" method through Spring caching pipeline. It is not surprising because context.operation object has a non-trivial implementation of the toString method.
We really think that this Assert.notNull call should be refactored into if(key == null)... for performance reasons.
Affects: 4.1.3
Referenced from: commits 67f1842
Backported to: 4.0.9
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: