In the current version (0.7) of reactive-banana, the fromPoll
function actually creates a behavior whose value is determined by executing the polling action whenever any event happens at all.
In contrast, fromChanges
will only update the behavior when the particular event given as argument has an occurrence.
In other words, in the current implementation, fromPoll
is always less efficient than fromChanges
.
Then again, I wouldn't worry too much about efficiency right now, because I haven't spent much time implementing suitable optimizations yet. Just use whatever is simplest now and save any efficiency issues for future versions of reactive-banana.