Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5675

Camel Route Startup Performance Slow

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.6
    • Fix Version/s: 2.11.0
    • Component/s: camel-core
    • Labels:
    • Environment:

      JDK 1.6

    • Estimated Complexity:
      Novice

      Description

      I am writing unit tests for Camel and found that each unit test was taking up to a second just to create the Camel routes. That's not very long, but we have a large unit test suite that needs to run quickly.

      I did a performance profile and found that most of the time is going to the method org.apache.camel.util.IntrospectionSupport.getProperties(Object, Map, String). That method, then also calls IntrospectionSupport.isSetter(Method), and just running two unit tests I saw isSettter called 2.5 million times!

      It seems to me that a cache per class of the properties would make a huge performance improvement on Camel route building.

        Attachments

        1. after.png
          121 kB
          Claus Ibsen
        2. before.png
          101 kB
          Claus Ibsen
        3. CAMEL-5675.patch
          20 kB
          Claus Ibsen

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              lesnovell Les Novell
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: