Commit 7a81c56
authored
perf: remove unnecessary lock in ObjectTracker.TrackObjects (#5217)
* perf: remove unnecessary lock in ObjectTracker.TrackObjects
TrackedObjects is per-TestContext and TrackObjects is called from a
single thread per test context. The lock(kvp.Value) on each HashSet
caused Monitor.Enter_Slowpath contention (~1.25% exclusive CPU) during
parallel test execution of 1,013+ tests, with no actual concurrent
access to protect against.
* style: trim comments referencing removed lock1 parent c3bb360 commit 7a81c56
1 file changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
| 92 | + | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
93 | 95 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | | - | |
218 | 216 | | |
219 | 217 | | |
220 | 218 | | |
| |||
0 commit comments