[
https://issues.apache.org/jira/browse/CAMEL-27094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146102#comment-18146102
]
Claus Ibsen commented on CAMEL-27094:
-------------------------------------
Yes you are welcome to try that and send a PR then we can better judge/review
at that point
> 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
>
> {{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)