How to reproduce:
1. Create a new empty project
2. Open the Profiler window (Window -> Analysis -> Profiler)
3. Enter Play Mode
4. Focus the Profiler Window
Expected result: Stable and consistent performance of the Editor
Actual result: Semaphore.WaitForSignal degrades the performance of the Editor
Reproducible with: 2019.4.38f1, 2021.1.21f1, 2021.3.1f1, 2022.1.0f1, 2022.2.0a11
Not Reproducible with: 2020.3.33f1, 2021.1.22f1, 2021.1.28f1
Note:
- Using the VR Template, performance is twice as bad
- Performance of the PlayerLoop in 2021.3 sways between 10.0ms and ~15.0ms
- Performance of the PlayerLoop in 2022.1 is significantly better, but performance is still visibly affected (~5.0ms)
- Performance of the PlayerLoop in 2021.1.28f1 sways between 0.3ms and 3.0ms