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

Improve performance of bean lookup by type for DefaultListableBeanFactory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Last commented by a User:
      true

      Description

      This has been a problem in applications using @Provider combined with @Autowired where the bean look ups exhibit performance problems.

      These are quotes from a user:

      "Under heavy load we are experiencing heavy lock contention in DefaultListableBeanFactory.findAutowireCandidates()."

      "Under heavy load this is severely limiting our throughput".

        Issue Links

          Activity

          Hide
          youngm Mike Youngstrom added a comment -

          One specific usecase where improving type lookup performance would be beneficial is in the case of an Autowired Provider of a non singleton bean.

          @Autowired Provider<SomeNonSingleton> someBean;

          If I'm doing someBean.get() inside of a filter, for example, that makes every request lock on the singleton mutex.

          I believe this issue may be related: SPR-7949

          Mike

          Show
          youngm Mike Youngstrom added a comment - One specific usecase where improving type lookup performance would be beneficial is in the case of an Autowired Provider of a non singleton bean. @Autowired Provider<SomeNonSingleton> someBean; If I'm doing someBean.get() inside of a filter, for example, that makes every request lock on the singleton mutex. I believe this issue may be related: SPR-7949 Mike
          Hide
          youngm Mike Youngstrom added a comment -

          This issue appears to be related to SPR-6870.

          Show
          youngm Mike Youngstrom added a comment - This issue appears to be related to SPR-6870 .
          Hide
          cbeams Chris Beams added a comment -

          This issue duplicates SPR-6870, which is now resolved. Please give it a try (available now in 3.2.0.BUILD-SNAPSHOT).

          Show
          cbeams Chris Beams added a comment - This issue duplicates SPR-6870 , which is now resolved. Please give it a try (available now in 3.2.0.BUILD-SNAPSHOT).

            People

            • Assignee:
              cbeams Chris Beams
              Reporter:
              thomas.risberg Thomas Risberg
              Last updater:
              Trevor Marshall
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 8 weeks, 5 days ago