[
https://issues.apache.org/jira/browse/CAMEL-15061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17107363#comment-17107363
]
Grzegorz Grzybek commented on CAMEL-15061:
------------------------------------------
FIxed
[here|https://github.com/apache/camel/commit/0c0efc1d954a975f04bfb434967ac757600425b2]
in https://github.com/apache/camel/commits/master.
Fixed
[here|https://github.com/apache/camel-karaf/commit/10c898715aaaded9f7d9f072b7ce8c827a74deb7]
in https://github.com/apache/camel-karaf/commits/master.
> 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)