You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Grzegorz Grzybek (Jira)" <ji...@apache.org> on 2020/05/14 09:42:00 UTC
[jira] [Updated] (CAMEL-15061) Performance issues with
classMap.computeIfAbsent() in DefaultFactoryFinder
[ https://issues.apache.org/jira/browse/CAMEL-15061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grzegorz Grzybek updated CAMEL-15061:
-------------------------------------
Fix Version/s: 3.4.0
2.25.2
> Performance issues with classMap.computeIfAbsent() in DefaultFactoryFinder
> --------------------------------------------------------------------------
>
> Key: CAMEL-15061
> URL: https://issues.apache.org/jira/browse/CAMEL-15061
> Project: Camel
> Issue Type: Bug
> Reporter: Grzegorz Grzybek
> Assignee: Grzegorz Grzybek
> Priority: Major
> Fix For: 2.25.2, 3.4.0
>
>
> When Camel routes start, there are unnecessary calls from class DefaultFactoryFinder in method
> {code}
> protected Class<?> addToClassMap(String key, ClassSupplier mappingFunction) throws ClassNotFoundException, IOException {
> try {
> return classMap.computeIfAbsent(key, (String classKey) -> { ...
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)