Are there any recommended methods for amortizing the costs of garbage collection and visibility changes? Can we control the number of actors per frame that are destroyed or have visibility changes applied?
Details:
We are seeing major performance spikes related to level streaming. We are currently using LevelStreamingVolumes but would expect to see similar results using WorldComposition.
The largest spike occurs when the garbage collector cleans up an unloaded level. This spike persists over several frames. Additionally, we see single frame spikes when a level’s visibility changes (as all actors in the the level change visibility in a single frame).
The above image shows the performance hit of asynchronously loading the level, followed by the level becoming visible.
The second image shows the previous level losing visibility (via LevelStreamingVolume), followed by the prolonged spike of garbage collecting the unloaded level.