mirror of
https://github.com/sbt/sbt.git
synced 2026-09-07 19:05:53 +02:00
Resolution.projectCache is not a field: it maps projectCache0 into a version-string-keyed copy on every call. SbtUpdateReport read it once per dependency, and again per parent POM while assembling inherited licence info, so for N modules resolved that is N rebuilds of an N-entry immutable map -- turning a Resolution into an UpdateReport was quadratic in the modules it names. On a 301-project build this was 61.9% of the CPU update spends, 83% of it entering through lookupProject. Read it once per report and reuse it, at every call site including the eviction loop, which read it three times per conflict. The report produced is unchanged; only the number of times the same map is built. Co-authored-by: Claude Opus 5 <[email protected]>