plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.53k stars 2.07k forks source link

Performance issue with live updates #699

Open Neil-Bennett opened 5 years ago

Neil-Bennett commented 5 years ago

Dear all,

I have noticed a performance limitation of the updated graphs when I try to implement the live updates (https://dash.plot.ly/live-updates) tutorial.

I implemented the tutorial example without changes and it works as expected, however I noticed that if I increase the number of data points the traces on the dashboard cease to display (axis is rendered but no lines/markers are visible) when the number of points is greater than approximately 2000 (I used trial and error to find values that worked).

I tried changing the figure ‘type’ parameter to ‘scattergl’, but this was ineffective. This behaviour is observed in Chrome, Firefox and internet explorer.

If I increase the update interval time to e.g 5 seconds, I can plot 10,000 data points, but this is not very satisfactory as I am trying to base my own application on this approach but I need to plot e.g 24 hours worth of data at 1 second intervals, refreshing the graph with new data every 1-2 seconds.

Is this performance limitation expected and is there a way to improve this performance?

shengqiangzhang commented 5 years ago

@Neil-Bennett I haved the same problem.It seems that there is no other choice unless increasing the intervals time when you increase the number of data points.

petebachant commented 5 years ago

I'm getting a similar issue with an app using a 5 second interval. Strangely, the app works fine on Linux, but sometimes I never get a single update on Windows. Sometimes I'll get a "max call stack exceeded" error from the JS as well.

jingw222 commented 4 years ago

Same problem here. I wonder how well the JS library handle this sort of task.