Severity: Warning
File: src/Servy.Core/Services/ServiceControllerWrapper.cs
Lines: 105–163
Description:
BuildDependencyTree uses a List<string> path-tracking approach for cycle detection. For diamond dependencies (A → B, A → C, both B and C → D), service D is fully expanded twice. For wide dependency trees this causes redundant SCM queries and O(n²) overhead. The variable name and XML doc comment also don't match (visited in doc vs currentPath in code).
Suggested fix:
Use a separate global HashSet<string> for already-fully-expanded nodes to avoid redundant traversal. Fix the doc comment to match currentPath.
Severity: Warning
File:
src/Servy.Core/Services/ServiceControllerWrapper.csLines: 105–163
Description:
BuildDependencyTreeuses aList<string>path-tracking approach for cycle detection. For diamond dependencies (A → B, A → C, both B and C → D), service D is fully expanded twice. For wide dependency trees this causes redundant SCM queries and O(n²) overhead. The variable name and XML doc comment also don't match (visitedin doc vscurrentPathin code).Suggested fix:
Use a separate global
HashSet<string>for already-fully-expanded nodes to avoid redundant traversal. Fix the doc comment to matchcurrentPath.