Hi, I am trying to redraw only single trace in a plot of many traces (biophysical data). I tried to follow instructions in react-plotly and plotlyjs documentation:
Documentation says Plotly.react() should update only elements that has been changed.
Plot is updated but I don’t see any performance improvement if I change only single element of data or all data elements:
Here is MWE in codepen
Briefly, I generated sample data 100 traces of 10000 points and changing only first trace with:
data.x = [...Array(10).keys()].map( c=> c/10) //change only first trace data.y = [...Array(10).keys()].map( c=> Math.random()) Plotly.react('myDiv', data, layout);
Drawing plot containing single trace takes just a split of second, but if I had already drawn many traces and I want to redraw only single trace, it takes same time as to redraw all traces (few seconds).
Opened issue here: why Plotly.react() is as slow as Plotly.newPlot()? updating single trace of many · Issue #5674 · plotly/plotly.js · GitHub
Am I doing something wrong?