Add Commands::insert_batch and remove_batch for faster component modification #2693
Labels
A-ECS
Entities, components, systems, and events
C-Performance
A change motivated by improving speed, memory usage or compile times
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
Inserting and removing components one at a time is slow.
What solution would you like?
Add
Commands::insert_batch
andremove_batch
to modify components en-masse in a more efficient way.What alternative(s) have you considered?
Work towards #1613 for component modification and exclusively use that in performance-critical code.
We could use
insert_or_spawn_batch
for the insertion case, but that does not fail in the desired ways at all.Additional context
Follows up on the work from #2673, which added
insert_or_spawn_batch
. Ideally we can use the same strategy for this work, and perform similar benchmarks.The text was updated successfully, but these errors were encountered: