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

Order archetypes inside of query cache #137

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Order archetypes inside of query cache #137

merged 1 commit into from
Nov 20, 2024

Conversation

memorycode
Copy link
Contributor

@memorycode memorycode commented Nov 16, 2024

Proposed changes

This PR turns each query cache entry into an array instead of a map. This fixes an issue where archetypes could be entirely skipped in queries if a new archetype was added into it during iteration (the next call would change ordering.) This is no longer an issue in v0.9.x because the cache is gone, but is worth backporting into v0.8.

Related issues

This fixes #141 by ensuring all entities/archetypes are iterated.

Additional comments

This was noticed by and originally fixed by @TheyCallMeRyan.

@memorycode memorycode requested a review from a team November 16, 2024 01:42
@LastTalon LastTalon linked an issue Nov 18, 2024 that may be closed by this pull request
@LastTalon
Copy link
Member

Be sure to add @TheyCallMeRyan as a co-author here.

@memorycode memorycode merged commit a72921d into v0.8 Nov 20, 2024
6 checks passed
@memorycode memorycode deleted the fix-query-cache branch November 20, 2024 14:47
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

Successfully merging this pull request may close these issues.

Archetypes are skipped in queries
2 participants