After update V38.0, adding and removing entities in the world started to cause severe server degradation.
I’m developing a procedural system that relies on spawning and removing Prefabs dynamically. Each prefab contains several child entities with components (static meshes, logic, etc.).
Before this update everything worked fine but now the performance cost increased drastically.
Using Verse profiling, the average cost to add just 1 prefab to the world is now around 300 ms, and the value keeps increasing over time until the session eventually crashes.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Stability
Steps to Reproduce
Steps to Reproduce
Create a Prefab and add several child entities with static_mesh_component and simple logic.
Use Verse to spawn this prefab dynamically.
Add and remove this entity repeatedly from the world.
Use profile() in Verse to monitor performance.
Observe that each add/remove iteration increases the cost progressively
Example Verse code for testing:
tile_spawn_debug_device := class(creative_device):
@editable
DebugButton : button_device = button_device{}
@editable
Entity : ?entity = false
OnBegin<override>()<suspends>: void =
DebugButton.InteractedWithEvent.Subscribe(OnDebugButtonPressed)
OnDebugButtonPressed(Agent : agent):void=
spawn:
RunSpawnTest()
RunSpawnTest<public>()<suspends>: void =
loop:
profile("TileDebug:InstantiatePrefab"):
spawn:
TrySpawn()
Sleep(2.0)
TrySpawn()<suspends>:void=
if(HasEntity := Entity?):
if (Sim := GetSimulationEntity[]):
Sim.AddEntities(array{HasEntity})
Sleep(1.0)
HasEntity.RemoveFromParent()
Expected Result
Spawning and removing prefabs should maintain stable performance, with consistent profiling times similar to previous versions (V37.x and earlier).
Observed Result
After the V38.0 update, every Add/Remove operation increases the processing cost exponentially.
Average time per spawn rose to ~300 ms (and growing).
The degradation accumulates over time.
Eventually the island crashes due to performance exhaustion.
Platform(s)
Windows (UEFN / Verse)
Video
Additional Notes
This issue directly affects any use of dynamic prefabs in Verse.
The problem appears before the prefab even finishes spawning simply instantiating the entity already spikes the profiling cost.