Steps to reproduce:
I took a profile here: https://perfht.ml/31EpEhu
It appears the slowness comes from the following area:
Specifically the call to context.drawImage:
context.drawImage(this.renderer.domElement, 0, this.canvas.height - heightDPR, widthDPR, heightDPR, 0, 0, widthDPR, heightDPR); is very slow in Firefox making the model viewer not very usable.
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1590515 in Firefox, but wanted to pass it along to this project, as I'm not sure when that will be prioritized.
Unknown
@gregtatum Yes, unfortunately this is something we have been aware of. We also have plans to fix it for various scenarios (#216, #37). I think ideally this particular use case would be addressed by #216. In that case, we would detect that only one <model-viewer> is being used, so we would not bother with the
For context, the reason why we invoke drawImage like that is to get around the browser limitation of number of GL contexts that can be created in one session.
Most helpful comment
@gregtatum Yes, unfortunately this is something we have been aware of. We also have plans to fix it for various scenarios (#216, #37). I think ideally this particular use case would be addressed by #216. In that case, we would detect that only one
<model-viewer>is being used, so we would not bother with theFor context, the reason why we invoke
drawImagelike that is to get around the browser limitation of number of GL contexts that can be created in one session.