Skip to content

Reduce allocations. #69

@back2dos

Description

@back2dos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions