Ayush Kulshreshtha created CAMEL-27094:
------------------------------------------

             Summary: 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


{{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)

Reply via email to