Does plotly.js really support virtual-webgl?
From what I understand, support for virtual-webgl was added in version 2.28.0, but this doesn't seem to make a difference for me. I mean, I am currently using version 3.1.0 and I am getting the Too many active WebGL contexts. Oldest context will be lost. warning even though I added <script src="https://unpkg.com/browse/[email protected]/src/virtual-webgl.js"></script> to my HTML file, as mentioned here. So, what am I missing?
Otherwise, I understand that the virtual-webgl script is for WebGL1, not WebGL2. However, from here, I also understand that the WebGL1 wrapper is pretty slow. So, is it really worth using?
I use virtual-webgl very successfully in my own project. It does impact performance, but it's the only way I know of to put dozens of WebGL plots on the same page. It's not supported by all browsers - Safari in particular fails to use it. I haven't tested every other browser, I'm fortunate to be able to just tell my users to stick to Chrome.
Thanks for sharing your experience. I don't personally use Safari, but some of my users likely do, so that alone is a no-go for me. Also, I wish I could try it for myself. Not sure why it's not working in my setup. 🤔
I found the performance with virtual-webgl to be unacceptable for our use case. What worked was increasing the WebGL contexts in Chrome, or just use Firefox (which has a much higher default limit). I've opened a ticket against Chromium to increase the limit, but it hasn't really gone anywhere: https://issues.chromium.org/issues/437316557