Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use EntityWorldMut::insert_by_ids #332

Open
Shatur opened this issue Oct 10, 2024 · 1 comment
Open

Use EntityWorldMut::insert_by_ids #332

Shatur opened this issue Oct 10, 2024 · 1 comment

Comments

@Shatur
Copy link
Contributor

Shatur commented Oct 10, 2024

Currently, we insert components one by one, which causes a lot of archetype moves and behaves somewhat unexpectedly with observers/hooks.
To solve this, we could pass a special buffer for components instead of using Commands, and after all insertions, call EntityWorldMut::insert_by_ids.

@UkoeHB
Copy link
Collaborator

UkoeHB commented Oct 10, 2024

If bevy implements command batching, this would no longer be a perf issue (although observers might still run separately).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants