sjtrny
October 18, 2019, 12:38am
9
Ok this seems like a known issue with plotly not Dash. Many traces leads to poor performance. This is probably the worst possible case because there’s a trace for each pair of points.
Thanks @tcbegley for the hint, I tried the different suggestions in that thread. It does not seem to solve my problem. It seems that the creator of the thread had an issue with the graph loading at all which for me there is no difference between the online version and the locally compiled version of dash-core-components.
Independent on which version (pip or local build) I still have significant performance changes between all points in one trace and spreading the points out over a large number …
opened 04:48PM - 08 Nov 18 UTC
type: performance
I found one conversation about this in issue [1535](https://github.com/plotly/pl… otly.js/issues/1535) and it was referenced as the achilles heell in plotly in the comments but that was over a year ago so I wanted to include a new example to see if anything can be done.
A contrived, reproducing example is here:
[example](https://codepen.io/rhamner/pen/bQpgZy?editors=1010)
On my machine in chrome and plotly 1.42.4, I'm getting the following results for rendering 10k total points:
- 1 trace: ~80 ms/call
- 10 traces: ~90 ms/call
- 100 traces: ~140 ms/call
- 1000 traces: ~650 ms/call
The real-life example that made me notice this is 15k points going from <200 ms/call to ~15 seconds/call over the range of trace numbers. This is really impactful in our use case. We are already trying to minimize the total number of traces so I'm not sure if there's anything we can do to improve this on our end.
opened 03:17PM - 30 Mar 17 UTC
closed 08:06PM - 10 Apr 17 UTC
type: performance
Here is the [testing script](https://jsfiddle.net/smileyhaowen/tf4bpk5w/3/)
I… kept the total data points fixed, and tested different combinations of amount of traces and amount of data points per trace:

You could see that 5000 traces needs 17 seconds to render even it only renders 5000 markers in total. But for the case of only 1 trace, scattergl could use that 17 seconds to render over 10 million markers!
And by looking into the code I found that for each trace we created a Scene2D and a Shader, which get the shader reference and rebuild program. Is there anything we can optimize here?