How to reproduce:
- Open the attached "IN-153031" project
- Open Window > Analysis > Profiler
- In Profiler Window turn on "Deep Profile"
- Enter Play mode
- Wait about 2 seconds
- Press Pause or exit Play mode
- In the Profiler window in CPU Usage > Select any frame except the first or last in the top chart
- In the Profiler hierarchy click the GC Alloc column header to sort by descending
- Type "List`1..ctor()" in the search bar or alternatively expand: PlayerLoop > UpdateScene > SimulationSystemGroup > DummyDelegateWrapper.TriggerUpdate() > SystemBase.Update() > Default World Unity.Entities.SimulationSystemGroup > ComponentSystemGroup.OnUpdate() > ComponentSystemGroup.UpdateAllSystems() > ComponentSystemGroup.SortSystems() > ComponentSystemGroup.RecurseUpdate() > ComponentSystemGroup.GenerateMasterUpdateList()
- Observe the GC Alloc column on List`1..ctor()
Actual result: GenerateMasterUpdateList allocates a managed List every frame (96~104 B) because SortSystems re-runs on every update
Expected result: No per-frame allocation when the system set has not changed
Reproducible with: 6000.6.1f1, 6000.7.0a1, 6000.7.0a6
Not reproducible with: 6000.6.0a7
Could not test with: 6000.0.0f1, 6000.0.83f1, 6000.3.24f1 (older Entities has a different profiler path)
Reproducible on: Windows 11
Not reproducible on: No other environments tested