Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13365

unnessecary calls to classMap.computeIfAbsent() in Camels DefaultFactoryFinder class has performance impact

    XMLWordPrintable

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • fuse-7.3
    • fuse-7.7-GA
    • Camel, Fuse Standalone
    • None
    • fuse-7.7-build5
    • -

    Description

      When Camel routes start, there are unnecessary calls from class DefaultFactoryFinder in method

         protected Class<?> addToClassMap(String key, ClassSupplier mappingFunction) throws ClassNotFoundException, IOException  {
              try {
                  return classMap.computeIfAbsent(key, (String classKey) -> { ...
      

      In a Karaf environment with the Java security manager enabled, this causes a massive delay in starting Camel routes, since there are thousands of calls into org.apache.felix.framework.BundleImpl.getEntry(), which is then authorised by the Java Security Manager. Its seems a bulk of these calls could be avoided if the call to classMap.computeIfAbsent() dealt with null values as well.

      Attachments

        Activity

          People

            ggrzybek Grzegorz Grzybek
            rhn-support-tmielke Torsten Mielke
            Vratislav Hais Vratislav Hais
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: