I’ve been developing a live app using a PSQL database, and it seems to be working perfectly… but when the app is running on background (for example; browser is minimized), it starts to display data on the graph slowly; if data is visualized every second, and after 10 minutes it should have 600 points, it does have less than 600 points.
I’ve used the app shown in the example below and it has the same problem. Does anyone know how to resolve this problem, or when a Dash app runs on background, it always runs slowly?
Example used: https://pythonprogramming.net/live-graphs-data-visualization-application-dash-python-tutorial/
Hi there,
I tested this out with the test app you posted (code below for ref) and replicated this issue. Looks to me to be the browser limiting resources in background tabs (the behavior was slightly different in chrome and firefox.)
I created an issue for this here: https://github.com/plotly/dash-core-components/issues/208
But, I think there needs to be further discussion on what exactly is the desired behavior. Is it desirable to keep potentially expensive callbacks running in the background for example?
As a workaround, for your app, I would create a reload button that reloads the graph and dcc.Interval
callback that a user can click when they’re off screen for a while. That way, the app is paused while they’re not looking at it, and they can easily reset it without reloading the entire page.