Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-7630

Major performance slowdown in AnnotationUtils.findAnnotation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.0.5
    • Component/s: Core
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              snicoll Stéphane Nicoll
              Last updater:
              Spring Issues Spring Issues
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 30 weeks, 3 days ago