Skip to content

Major performance slowdown in AnnotationUtils.findAnnotation [SPR-7630] #12286

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Issue Links:

Referenced from: commits 3c067e5

1 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions