You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate performance issues with recording replay canvas #10497
We should look into moving the createImageBitmap call into a webworker.
Another task that blocks the UI is on the initial serialization snapshot. rrweb calls toDataURL() on the canvas in the main UI thread to export as an image.
We can't move createImageBitmap to web worker because:
we would need to transfer canvas to webworker which can only be done if we convert it to offscreen canvas
by transferring control to offscreen canvas, we cannot write to the canvas from the UI
it might be possible to clone the canvas and transfer it to web worker -- initial benchmarks seem to indicate that copying the canvas is faster than createImageBitmap, though probably increased memory usage
Though, from looking at recent profiles, I don't see createImageBitmap as that big of an issue -- I see more main thread blocking from toDataURL when serializing the initial DOM snapshot. Have not gotten around to investigating that yet.
Activity
bruno-garcia commentedon Feb 26, 2024
We'll potentially move the createImageBitmap call to the web worker. Further investigation needed
billyvg commentedon Mar 12, 2024
createImageBitmapto web worker because:createImageBitmap, though probably increased memory usageThough, from looking at recent profiles, I don't see
createImageBitmapas that big of an issue -- I see more main thread blocking fromtoDataURLwhen serializing the initial DOM snapshot. Have not gotten around to investigating that yet.mydea commentedon Dec 11, 2024
@billyvg I am closing this for now as I do not think we have any work planned on this - we can always reopen if relevant!