Summary
Scenegraph Entities with Verse Components cause performance issues and can randomly freeze the game.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Stability
Steps to Reproduce
- Create a custom verse component, this verse component does not need any code.
- Create a prefab. Add mesh_component which can be the default cube and add a transform_component. Finally add the custom verse component to the prefab.
- Enable show fps option in the Fortnite game options.
- Create a device to spawn the prefab, we did it via a button.
- Start the game and spawn the prefab in the game world and look at the fps counter. You’ll see the down arrow number drop drastically.
Expected Result
Upon spawning a prefab with a custom verse component there should not be any fps drops. Much like spawning an entity without the custom verse component.
Observed Result
Spawning a prefab with a verse component that contains no code has a massive drop in performance. In our actual game project with environment art spawning a prefab with a cube and a verse component completely freezes the game for a few seconds.
After the first time a prefab with a verse component spawns you experience the performance drop. However prefabs spawned after the initial prefab do not cause a performance drop.
The only exception is during gameplay the game will randomly freeze again after an unknown time if you spawn a prefab. We are suspecting the garbage collection process with scene graph entities but we are not sure.
Platform(s)
PC
Video
Empty Project Video: https://drive.google.com/file/d/1ek7cVYzg4pYXEWePdqQhguCq_lNJSWzq/view?usp=drive_link
Main Project Video: https://drive.google.com/file/d/1E2fN5VTu2T7OPBeIi8GaINW8zowyz_3n/view?usp=drive_link
Additional Notes
We made sure in the main project to disable other code from running in our tests. Without the scenegraph entity spawning there is no game freeze/lag occuring. With the entity spawning there is game freeze/lag.
We did not encounter this issue late November and suddenly experienced it during December. We believe this issue is from an update between December and now.
This can be seen even more aggressively if you use a program such as MSI Afterburner to look at the 0.1 percent low fps.
Component Code Image:
Prefab Spawn Code Image:
MSI Afterburner Benchmarks: