PR #12264 added a per-instance ReaderWriterLockSlim to PropertyDictionary<T> to prevent concurrent modification during enumeration. Because PropertyDictionary<T> is created frequently during evaluation and ProjectInstance construction, this adds a relatively large lock object to every instance.
In an OrchardCore design-time build, ReaderWriterLockSlim account for approximately 71.84 MB of allocations across six MSBuild worker processes. Almost all are attributed to this per-instance allocation.
PR #12264 added a per-instance
ReaderWriterLockSlimtoPropertyDictionary<T>to prevent concurrent modification during enumeration. BecausePropertyDictionary<T>is created frequently during evaluation andProjectInstanceconstruction, this adds a relatively large lock object to every instance.In an OrchardCore design-time build,
ReaderWriterLockSlimaccount for approximately 71.84 MB of allocations across six MSBuild worker processes. Almost all are attributed to this per-instance allocation.