Skip to content

more efficient ref.on and ref.off #17

@scien

Description

@scien

current refs keep an array with each event

events:
  type: [handler1, handler2]

ref.off 'value' isn't called until events[type] is empty. when we could do ref.off 'value', handler1 and stop receiving those events immediately.

note this only affects refs with two listeners.

i think all of my code avoids this anyway by using multiple refs

document.get('property').on 'value', handler1
document.get('property').on 'value', handler2

which would then use separate refs and this would be a non-issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions