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

Improve performance of ReflectionUtils#getUniqueDeclaredMethods

    XMLWordPrintable

    Details

    • Last commented by a User:
      true

      Description

      There is a start up performance issue, if I configure beans for an application with JavaConfig (JavaConfing with more than 100 beans). The time to create the beans increases significantly more than when I configured the beans via XML-Based. I have performed a profile on the project and found that the problem lies in the MethdoeRefelctionUtils. getUniqueDeclaredMethods()( This method try to filteries out overrided methods from superclass).

      But if I break the JavaConfig down into smaller files (each file 10 beans), than the start will be performed quickly. I'm well aware that it is better to have smaller files, however, it is the algorithm of the method RefelctionUtils.getUniqueDeclaredMethods () badly designed when more than 100 beans......

        Attachments

        1. C.java
          41 kB
        2. C300.java
          41 kB
        3. screenshot-1.png
          screenshot-1.png
          319 kB
        4. Service.java
          0.0 kB
        5. ServiceImpl.java
          0.1 kB
        6. TestC.java
          0.6 kB
        7. TestC300.java
          0.6 kB

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              kajen Thusinthan Kajendran
              Last updater:
              Spring Issues Spring Issues
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                3 years, 24 weeks, 4 days ago