-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add archetype cache to queries #53
Comments
resolved by: bd8e979 |
reopening because bd8e979 doesnt actually change iteration |
I think this was fixed by #863 - at least |
Note quite. It has an archetypes field, but it doesn't cache matches, which means we need to check every archetype every time. My bevy_ecs core rewrite adds "stateful queries" which cache these results. |
Yup! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently hecs queries iterate over all archetypes to check if that archetype matches the query. For a small number of archetypes, this is probably faster, but it will get more expensive as the number of archetypes (and/or number of components per archetype) gets larger. for a game engine (which will have many archetypes), it makes sense to have a cache. we could then invalidate the cache whenever an archetype is added/removed.
The text was updated successfully, but these errors were encountered: