getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.95k stars 1.57k forks source link

Investigate performance issues with recording replay canvas #10497

Open billyvg opened 8 months ago

billyvg commented 8 months ago

Example profile of this occurring.

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.

bruno-garcia commented 8 months ago

We'll potentially move the createImageBitmap call to the web worker. Further investigation needed

billyvg commented 7 months ago

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.