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

Why the update component method? #1

Open
Zireael07 opened this issue Apr 27, 2020 · 1 comment
Open

Why the update component method? #1

Zireael07 opened this issue Apr 27, 2020 · 1 comment
Assignees

Comments

@Zireael07
Copy link

Since components are just structs, you should be able to just edit them in-place, without a remove-and-add dance that invites GC in the middle...

@jcerise jcerise self-assigned this May 9, 2020
@jcerise
Copy link
Collaborator

jcerise commented May 9, 2020

I think when I first wrote that a while back, I had a use case for the removal and replace...but I can't recall what it would have been. Sort of a forest for the trees sort of thing. This is a great suggestion, and not only does it get rid of excess objects and limit GC as you pointed out, it'll drastically simplify the ECS update flow.

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