Description
Stéphane Nicoll opened SPR-7630 and commented
While migrating our app from 2.5.7 to 3.0.4 we have noticed a major slowdown in the application context's startup.
Our application is using Spring Batch and has 22 batches. I have ran a profiling session and noticed an abusive call to java.lang.Class.getMethod(String, Class[])
.
The culprit seems to be a change in AnnotationUtils.findAnnotation(Method,Class)
.
Attached the back trace calls for both Spring 2.5 and 3.0.4. The only thing that changed between the profiling sessions is the Spring version and the profiler only starts the (same) application context.
I also have the yourkit snapshots if you are interested to run a snapshot comparison.
This is obviously blocking us to upgrade. Let me know if there anything I can do to help.
Affects: 3.0.4
Reference URL: http://forum.springsource.org/showthread.php?p=323388#post323388
Attachments:
- spring25-batch-register-step-listeners-call-stack.png (108.12 kB)
- spring25-getMethod.png (19.30 kB)
- spring25-register-item-listeners-call-stack.png (91.53 kB)
- spring-3.0.4.xls (594.00 kB)
- spring-3.0.5-SNAP-getMethod.PNG (16.06 kB)
- spring-3.0.5-SNAP-register-item-listeners-call-stack.png (46.23 kB)
- spring3-getMethod.png (59.53 kB)
- spring3-register-item-listeners-call-stack.png (67.84 kB)
- spring3-register-step-listeners-call-stack.png (66.47 kB)
Issue Links:
- ReflectionUtils slow down application startup on WebSphere [SPR-11882] #16501 ReflectionUtils slow down application startup on WebSphere
- Comprehensively cache annotated methods for interfaces and superclasses [SPR-16675] #21216 Comprehensively cache annotated methods for interfaces and superclasses
Referenced from: commits 3c067e5
1 votes, 5 watchers