(continued from #332)
@jackparmer pointed me towards https://plot.ly/~PythonPlotBot/829, which is a good example of the sort of plots I'm working with.
On my machine (laptop without super graphics card, but 16GB ram), that page takes around 17s to load, and then clicking the "code" heading crashes the browser tab.
From chrome's profiler, it looks like there's a gap in the middle where the CPU isn't doing much, I'm not sure what's going on there.

The plots here (which are larger) load OK, but demonstrate some unexpected performance differences between the GL and non-GL
Thanks for reporting @ssfrr !
@etpinard and @dfcreative would know the most about what you're seeing. At one point heatmapgl plots could load 1M points in about 1s on a Macbook Pro - they may have regressed since then. There is a plan to keep an eye on benchmarks in the works here: https://github.com/plotly/plotly.js/pull/1511
Thanks for the report.
I'm getting ~1000ms render for 1e6 points here: https://codepen.io/etpinard/pen/YQYNNd?editors=1010
I didn't notice any regressions since heatmapgl was included in the main plotly.js bundle in v.1.21.0.
I very impressed with heatmap's performance. I guess Chrome has made some serious performance improvements in their canvas2d implementation in the last few months.
@jackparmer https://plot.ly/~PythonPlotBot/829 and https://jsfiddle.net/9wh2nz5z/2/ consistently crash chrome for me, every tab, not only GPU engine.
gl-heatmap2d seems to be slow by itself, regardless of plotly, here is the demo of 1e6 points. Although, comparing fps to 1e6 points before refactoring, there seems to be no regression introduced.
With experience of a couple audio-vis modules (like gl-spectrogram, spectrogram, sillyscope), should say that heatmapgl method of rendering is difficult for sustaining performance on millions of points, which spectrograms are.
Hm, maybe we should think about introducing spectrogram as its own GL trace type. It comes up often enough. MATLAB and matplotlib have dedicated spectrogram plots:
https://www.mathworks.com/help/signal/ref/spectrogram.html
https://matplotlib.org/examples/pylab_examples/specgram_demo.html
I've wondered about spectrogram/fft as a transform type, though figuring out the frequency axis scaling is usually the most finicky part. Transforms modifying layouts are perhaps not the best.
Most helpful comment
Hm, maybe we should think about introducing
spectrogramas its own GL trace type. It comes up often enough. MATLAB and matplotlib have dedicated spectrogram plots:https://www.mathworks.com/help/signal/ref/spectrogram.html
https://matplotlib.org/examples/pylab_examples/specgram_demo.html