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

Reduce allocations. #69

Open
back2dos opened this issue Jul 20, 2021 · 0 comments
Open

Reduce allocations. #69

back2dos opened this issue Jul 20, 2021 · 0 comments
Milestone

Comments

@back2dos
Copy link
Member

While benchmarking vs. MobX, I've noticed tink_state taxes the GC quite a bit more. Haven't profiled it yet, but two things seem to stand out as relatively obvious:

  1. Invalidator is the basis of all things and it subscribes every Invalidatable only once. The usage of a CallbackList is therefore not necessary, and the allocation of the CallbackLink can be avoided in favor of a method to unsubscribe an Invalidatable (by identity) again.
  2. The data contained in SubscribtionTo can be inlined into AutoObservable.
@back2dos back2dos added this to the 1.0 milestone Jul 20, 2021
back2dos added a commit that referenced this issue Jul 20, 2021
back2dos added a commit that referenced this issue Jul 20, 2021
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

1 participant