Current behavior:
In the integration test suite (and within usage.py, the extendData and prependData callbacks are triggered on a >= 100ms periodic interval. All tests pass.
However, if the interval is reduced there can be situations where a new callback may be triggered while an existing callback is still being executed (large dataset, slow compute). In this situation, the latest previous changes are discarded and a new state is created with the new information. Other possible triggers: asynchronous data updates when using an asynchronous/websocket server framework (dash-devices, dash-django).
The end result is that data can be lost in the ExtendableGraph object (traces are miss some updates).
Expected behavior:
The component should properly extend (or prepend) all data (no skips). I think the "eventually-consistent" model is the right approach.
Proposed Solution
dcc.Graph implements an array for extend / prepend props, allowing the "final" callback to handle multiple callbacks within a single execution. There is an issue in dash-core-components suggesting that the implementation is flaky.
Additional investigation:
Current behavior:
In the integration test suite (and within
usage.py, theextendDataandprependDatacallbacks are triggered on a>= 100msperiodic interval. All tests pass.However, if the interval is reduced there can be situations where a new callback may be triggered while an existing callback is still being executed (large dataset, slow compute). In this situation, the latest previous changes are discarded and a new state is created with the new information. Other possible triggers: asynchronous data updates when using an asynchronous/websocket server framework (
dash-devices,dash-django).The end result is that data can be lost in the ExtendableGraph object (traces are miss some updates).
Expected behavior:
The component should properly extend (or prepend) all data (no skips). I think the "eventually-consistent" model is the right approach.
Proposed Solution
dcc.Graphimplements an array for extend / prepend props, allowing the "final" callback to handle multiple callbacks within a single execution. There is an issue in dash-core-components suggesting that the implementation is flaky.Additional investigation:
prependDataandextendData?figure.dataandextendData?