Closed
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