Search Unity

Garbage Collector performance regression in 2018.3

Discussion in 'Editor & General Support' started by bmarinariSparky, Apr 30, 2019.

  1. bmarinariSparky

    bmarinariSparky

    Joined:
    Jan 5, 2018
    Posts:
    10
    We have shipped a number of versions of our game on 2017.4, and recently attempted to upgrade to Unity 2018.3.11. We found some huge performance problems with the GC in the new version that were not there in the old one. We do create a small but non-zero amount of garbage per frame, so some collections are not surprising, but it is now creating 200-600 ms spikes every second or two.
    The odd thing is that the amount of managed memory reserved doesn't seem to affect the frequency. i.e. another engineer tried reserving 256 MB on the managed heap at startup and saw identical behavior.

    We can't ship with a regression like this. We were hoping to try the incremental GC in 2019.1 and we can't use that either due to other bugs. Has anyone seen or mitigated this issue, or have any advice? Besides "create zero garbage". ;)