[
https://issues.apache.org/jira/browse/CAMEL-27094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-27094.
---------------------------------
Fix Version/s: 4.24.0
Resolution: Fixed
Merged to main in https://github.com/apache/camel/pull/30276
> camel-core - removeAllRoutes() is quadratic in the number of routes
> -------------------------------------------------------------------
>
> Key: CAMEL-27094
> URL: https://issues.apache.org/jira/browse/CAMEL-27094
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Ayush Kulshreshtha
> Priority: Major
> Fix For: 4.24.0
>
>
> {{AbstractCamelContext.removeAllRoutes()}} calls {{removeRoute()}} once per
> route, and since CAMEL-26893 each removal of a stopped route still gathers
> the endpoints of all remaining routes. Stopping or reloading n routes
> therefore walks O(n²) endpoint sets. The endpoints in use could be gathered
> once in {{removeAllRoutes()}} and updated as routes are removed. Suggested by
> Claus Ibsen in the review of
> [apache/camel#30255|https://github.com/apache/camel/pull/30255].
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)