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
#262 - Implement async: true option for model.start() (@nateps)
This is an experimental performance option for Model#start.
When a reactive function's inputs change, by default the function gets immediately and synchronously evaluated, updating the output data.
This new async: true option defers function evaluation until the next tick, which also lets it dedupe multiple input changes that happen in the same event loop.
In general, the evaluation delay means async: true should only be used in Derby components, and only when the controller does not directly read from the output path via e.g. Model#get.
Normally, when controller code changes a reactive function input, it can then immediately read the reactive function output and see the effects of the change to the input.
With async: true, the reactive function's output will continue to have the old value until the next event loop.
Chained reactive functions in components can use async: true, as long as the controller doesn't directly read any values downstream of the async: true functions.