You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
This is a kind of RFC before going to PR.
In my fork I've now added a major under-the-hood update to MochiKit.Signal lib.
It uses WeakMap and Set to store references to signals to enable automatic GC.
Should also be faster due to less linear searches.
All unit-tests pass except one, disconnectAllTo(function) since WeakMaps doesn't allow full iteration and I wanted to reduce WeakMaps to only source and dest objects, not functions.
Observe that this setup doesn't remove need to disconnect of course, WeakMaps only release fully GC:ed objects, it's not an out-of-your-scope release.
Another change in my fork is support for signal namespaces, similar to jQuery. That is a separate discussion I guess..
(WeakMap means IE10 is out, but code is written to still work in IE11 (no for-of loops or such))
The text was updated successfully, but these errors were encountered:
Hi,
This is a kind of RFC before going to PR.
In my fork I've now added a major under-the-hood update to MochiKit.Signal lib.
It uses WeakMap and Set to store references to signals to enable automatic GC.
Should also be faster due to less linear searches.
See: https://github.com/blq/mochikit/blob/master/MochiKit/Signal.js
All unit-tests pass except one, disconnectAllTo(function) since WeakMaps doesn't allow full iteration and I wanted to reduce WeakMaps to only source and dest objects, not functions.
Observe that this setup doesn't remove need to disconnect of course, WeakMaps only release fully GC:ed objects, it's not an out-of-your-scope release.
Another change in my fork is support for signal namespaces, similar to jQuery. That is a separate discussion I guess..
(WeakMap means IE10 is out, but code is written to still work in IE11 (no for-of loops or such))
The text was updated successfully, but these errors were encountered: