These are chat archives for pozadi/kefir
flatMapConcatdoes is correct, but there is a problem in
Kefir.fromPromiseAPI, it should also accept a function returning a promise, i.e. both
Kefir.fromPromise(() => promise)should work. I actually thought it's done that way already, but turns out it's not.
Kefir.fromPromise(() => promise)would call provided function lazily only when someone subscribes to the observable.
_spyHandlers) for debugging. Eliminating those when they are not used would slow down things when debug features are used, but would reduce memory usage when they are not used. Another example is the way
Dispatcherwork: a sequence of
addoperations followed by
removeoperations perform as
O(n^2)(https://accidentallyquadratic.tumblr.com/). That can be improved so that typical patterns, i.e.
removein reverse order of
add, run in
O(n)time. A third example would be that the implementation currently seems to create lots of copies of event objects unnecessarily. Avoiding unnecessary copying could give a performance boost as avoiding allocations really seems to be one of the keys to improving JS perf. Shall I create PRs for these optimizations?