Question
Plotly SVG-to-WebGL trace migration threshold for growing datasets
Mira Lane
0 reputation · 12 Apr 2024, 19:08 UTC
77.8K views0
Context
A Plotly.js dashboard currently renders time-series data using standard SVG scatter traces. The dataset grows by roughly 500 points per day, and the product team expects to reach 15,000 points within the next quarter. Research indicates that scattergl (WebGL) traces offload rendering to the GPU and handle larger datasets more efficiently, but they lack certain SVG features such as crisp text annotations and consistent dash-pattern rendering across browsers.
Constraints
- Must preserve existing annotation fidelity and dash-style consistency.
- Initial render and pan/zoom latency must stay below 200 ms on mid-range laptops.
- Migration must occur without a full-page reload; the figure object is serialized to localStorage for session restore.
Open questions
- At what approximate point count does the SVG-to-WebGL crossover become measurable for the described latency budget?
- Does
Plotly.reactpreserve annotation and dash-style parity when swappingscatterforscatterglin-place, or is a fullPlotly.newPlotrequired? - Are there documented memory-profile differences between the two trace types when the figure object is serialized and rehydrated?