-
-
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
[Merged by Bors] - Make events reuse buffers #2850
Conversation
At the time the thought was "garbage collection". If we clear, that means events will always use the amount of memory equal to the number of events generated on the "most active" frame. However for "high volume" regular events, clearing will be way faster. This new behavior is also consistent with the rest of bevy_ecs (which is also missing "garbage collection" for cases like this), so im inclined to merge. But I think components, component tables, and events should have some sort of "shrink capacity by half if |
While I could add some heuristic for garbage collection, or expose a method for manually shrinking the vecs as much as possible, I think these would be best done later with a more cohesive vision for how similar things are handled in the rest of the ECS. |
Yeah I do think garbage collection should be handled later (after much discussion). I'm going to merge this as I do like the consistency with the rest of bevy_ecs. |
bors r+ |
I'm really curious why this wasn't the case already...
I'm really curious why this wasn't the case already...