Microsoft.Build.Evaluation.ProjectRootElementCache is protected by a single _locker that is acquired by every read and every write. All evaluator threads in a single MSBuild process converge on this lock for every resolution, capping in-process evaluation parallelism regardless of available cores.
Symptoms: Profiling shows ~1,600+ contention events on _locker
WeakValueDictionary is not thread-safe, so every lookup requires the lock. BoostEntryInStrongCache is O(n) and runs under the lock on every cache hit.
Microsoft.Build.Evaluation.ProjectRootElementCacheis protected by a single_lockerthat is acquired by every read and every write. All evaluator threads in a single MSBuild process converge on this lock for every resolution, capping in-process evaluation parallelism regardless of available cores.Symptoms: Profiling shows ~1,600+ contention events on _locker
WeakValueDictionaryis not thread-safe, so every lookup requires the lock.BoostEntryInStrongCacheis O(n) and runs under the lock on every cache hit.