Skip to content

Switch new_and_build() to spawn_batch() after the BundleBuilder pattern is added if possible #29

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

Closed
TheLeonsver1 opened this issue May 23, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@TheLeonsver1
Copy link
Contributor

TheLeonsver1 commented May 23, 2021

like the title says, if all goes well and we only use .spawn_bundle() and nothing else per tile entity In new_and_build(), we should have very good perf, but if and when BundleBuilder(bevyengine/bevy#2157 (comment)) would be added,
if it plays well with spawn_batch() we should get even better perf because that would mean only one memory allocation for entities per layer if I understand correctly.

@TheLeonsver1
Copy link
Contributor Author

Until then, We decided to try and divide new_and_build() to new_and_build_flexible() and new_and_build_rigid() or something like that,
new_and_build_rigid() would be the much faster(1.6mil entities in 2 sec) version at the cost of flexibility, you would have to return the same bundle type for every tile

new_and_build_flexible() would be much slower(1.6mil entities in 24 sec) but you could spawn any bundle you'd like

@TheLeonsver1 TheLeonsver1 reopened this May 23, 2021
@StarArawn StarArawn added the enhancement New feature or request label May 28, 2021
@StarArawn
Copy link
Owner

No longer relevant with the new API.

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

No branches or pull requests

2 participants