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
Describe your context
As far as I can tell this is a general issue I have reproduced it in Jupyterlab with Diskcache and also in a separately served app with Gunicorn and Celery.
When a dash background callback is executed there is one initial request which sends all of the related inputs and states to the server and then a series of polling requests that contain the caheKey identifying the background callback until it has completed. Looking at the request being sent, I think it is sending all of the callback data with each polling request instead of just sending it once with the first request and then using only the cacheKey on subsequent requests.
The impact of this behaviour is that if there is a lot of input data the polling is very slow (for example uploading with dcc.Upload and then running a longer processing and saving in a background callback). Since the polling interval gets long due to all the uploading, progress and set_props updates can be missed entirely.
Expected behavior
It would be preferable to make the polling as fast as possible by dropping all of the callback inputs/states and just using the cacheKey to identify it.
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[BUG] Background callback polling request sends all callback inputs, states, outputs each time
Background callback polling request sends all callback inputs, states, outputs each time
Jan 3, 2025
Describe your context
As far as I can tell this is a general issue I have reproduced it in Jupyterlab with Diskcache and also in a separately served app with Gunicorn and Celery.
Describe the bug
When a dash background callback is executed there is one initial request which sends all of the related inputs and states to the server and then a series of polling requests that contain the caheKey identifying the background callback until it has completed. Looking at the request being sent, I think it is sending all of the callback data with each polling request instead of just sending it once with the first request and then using only the cacheKey on subsequent requests.
The impact of this behaviour is that if there is a lot of input data the polling is very slow (for example uploading with dcc.Upload and then running a longer processing and saving in a background callback). Since the polling interval gets long due to all the uploading, progress and set_props updates can be missed entirely.
Expected behavior
It would be preferable to make the polling as fast as possible by dropping all of the callback inputs/states and just using the cacheKey to identify it.
The text was updated successfully, but these errors were encountered: