Unity Issue Tracker - GarbageCollector CPU usage spikes when a Scene is loaded
Fixed
UUM-85249
GarbageCollector CPU usage spikes when a Scene is loaded
Unity: Optimization
Fixed
6.2.X
Won't Fix
6.1.X
6.0.X
2022.3.X
2021.3.X
Added a new option "Force GC on Scene Load"
We have a fix for this landed in Unity 6.2 but are not planning on backporting it because it's an opt-in feature. We'd happily review this if there is demand for it in these older Unity versions.
We have a fix for this landed in Unity 6.2 but are not planning on backporting it because it's an opt-in feature. We'd happily review this if there is demand for it in these older Unity versions.
We have a fix for this landed in Unity 6.2 but are not planning on backporting it because it's an opt-in feature. We'd happily review this if there is demand for it in these older Unity versions.
We have a fix for this landed in Unity 6.2 but are not planning on backporting it because it's an opt-in feature. We'd happily review this if there is demand for it in these older Unity versions.
How to reproduce:
1. Open the attached "IN-86602" project
2. Enter Play mode
3. Open the Profiler window (Window → Analysis → Profiler)
4. In the Profiler window observe the CPU Usage module and look at Highlights for any spikes in CPU usage
Expected result: GarbageCollector does not cause any spikes in CPU usage
Actual result: GarbageCollector causes a CPU usage spike (~150-200 ms in the project)