Found by AI full-repo code analysis (bugs and performance sweep of non-test projects).
Problem
src/Credfeto.DotNet.Repo.Tools.Dependencies/Services/DependencyReducer.cs:126-138 creates a fresh xmlCache/visited per project, so the recursive loaders (lines ~867-915 and ~1003-1054) perform O(P x T) XmlDocument.Load calls per repo (P projects, transitive closure size T) instead of ~P. Dwarfed by build times, but pure waste.
Failure scenario
A 100-project repo with deep reference chains: thousands of redundant csproj parses per repo per run.
Suggested fix
Hoist a repo-level cache keyed by canonical path, evicting entries for files the reducer itself rewrites.
Scope
src/Credfeto.DotNet.Repo.Tools.Dependencies/Services/DependencyReducer.cs
Found by AI full-repo code analysis (bugs and performance sweep of non-test projects).
Problem
src/Credfeto.DotNet.Repo.Tools.Dependencies/Services/DependencyReducer.cs:126-138creates a freshxmlCache/visitedper project, so the recursive loaders (lines ~867-915 and ~1003-1054) perform O(P x T)XmlDocument.Loadcalls per repo (P projects, transitive closure size T) instead of ~P. Dwarfed by build times, but pure waste.Failure scenario
A 100-project repo with deep reference chains: thousands of redundant csproj parses per repo per run.
Suggested fix
Hoist a repo-level cache keyed by canonical path, evicting entries for files the reducer itself rewrites.
Scope
src/Credfeto.DotNet.Repo.Tools.Dependencies/Services/DependencyReducer.cs