-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Milestone
Description
Kyrill Alyoshin opened SPR-12527 and commented
CacheAspectSupport class has the following line of code at the beginning of its generateKey method:
Assert.notNull(key, "Null key returned for cache operation (maybe you are using named params " +
"on classes without debug info?) " + context.operation);
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
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement