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

Support change detection #9

Closed
minecrawler opened this issue Nov 4, 2019 · 3 comments
Closed

Support change detection #9

minecrawler opened this issue Nov 4, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@minecrawler
Copy link
Collaborator

Fire events when components are created, components are added/removed and deleted.

@minecrawler minecrawler added enhancement New feature or request good first issue Good for newcomers labels Nov 4, 2019
@minecrawler minecrawler added this to the 1.0 milestone Nov 4, 2019
@minecrawler
Copy link
Collaborator Author

I guess I should change the scope to add/remove, because that's the only thing we can detect on an entity.

@minecrawler minecrawler removed the good first issue Good for newcomers label Sep 29, 2020
@minecrawler
Copy link
Collaborator Author

minecrawler commented Jul 16, 2021

@minecrawler
Copy link
Collaborator Author

minecrawler commented Jul 7, 2023

So I tested field-based changes, and while JS is a wonderful unicorn chewing gum and I can easily implement it, the performance is actually very bad (using Object.defineProperty.set) - especially for continually changing fields. Even if I create a wrapper which can be applied only to interesting components, it's bad. Iteration is faster if you just copy values over in a system, so that's what I recommend to do. Don't wait for mutation, just copy it.

With that, change events are handled. That's one of my oldest tickets, so cheers to closing it!

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

1 participant