Speeding up `add_trace()` and `show()` calls?

Hello everyone,

I hope you are well in these interesting and difficult times.

I am currently using Plot.ly for some visualization code and overall, we are enjoying the resulting interactive plots! One issue which I’m sure is no surprise is speed. Using the cProfile library, it seems a lot of our overhead is coming from add_trace() and show() calls.

Granted, we are making multiple figures (5-6), each with 3-12 subplots on them and each subplot containing upwards of 10+ lines each, so it is a lot of data.I recognize that.

I did want to reach out and ask if there were any known workarounds go getting these function calls to run faster. We basically used the examples to piece together our visualization code, so we are doing individual add_trace()calls for each line.

Furthermore, I have attempted to use the add_traces()call to try and group plotting together, but it doesn’t seem to earn me much. Perhaps I am using it incorrectly.

Any advice would help! Thank you!

1 Like

I have a same issue and I thought maybe, if I only add traces of parameters which got change from the last selection.
But it doesn’t seems to speed up the displaying data on the figure.

Looking for some help. I can provide code for testing.

1 Like

Hello @Akshay91,

Yes please! Makes troubleshooting a lot easier to have to not create something new to test. :slight_smile: