Replies: 2 comments 4 replies
-
|
When spawning large batches of entities, use You can further reduce overhead by using an exclusive system, to avoid the indirection of commands, but |
Beta Was this translation helpful? Give feedback.
-
|
Commands have an overhead due to storing such commands (which requires using memory) and then invoking them (which involves dynamic dispatch). If you're spawning lot of entities this might become a bottleneck, so directly spawning them using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys.
In the project that i'm realizing, i need, for every frame to spawn and despawn a large number of entities.
To parallelize the code where i create commands to spawn and despawn entitites, i used ParallelCommands.
The apply_deferred is obviously sequential, and can be a large bottleneck for my project, where performance is really important.
I checked in unofficial documentation, and i discovered that a solution for my problem can be an exclusive system. How this can be a much better solution for my problem? With direct access to the world i can allocate space for this entities in a more efficient way?
Beta Was this translation helpful? Give feedback.
All reactions