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

getBean(Class) lookup performance degredation

    XMLWordPrintable

    Details

      Description

      When upgrading from 5.0.9 to 5.1.0.RC3 i experienced severe performance degredation in some parts of an application that happens to call ApplicationContext.getBean(Class) many times in for loops.

      I have reproduced the problem in the referenced project.

      500k lookups of the same bean takes 1,5 seconds in 5.0.9 but 11 seconds in 5.1.0.RC3 on my computer.

      When activating TRACE logging both versions prints Returning cached instance of singleton bean 'thebean' from org.springframework.beans.factory.support.DefaultListableBeanFactory  but something clearly has broken regarding the cache

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            nytro77 nytro77
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 24 weeks, 1 day ago