Closed ShinyChang closed 3 weeks ago
I followed Set Up Session Replay | Sentry for Javascript and got CPU high usage.
The takeCanvasSnapshots should not be in rAF loop when the isManualSnapshot is true. I also checked the rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.ts at master · rrweb-io/rrweb and confirmed it's Sentry customized logic.
isManualSnapshot
Background
I followed Set Up Session Replay | Sentry for Javascript and got CPU high usage.
Solution
The takeCanvasSnapshots should not be in rAF loop when the
isManualSnapshot
is true. I also checked the rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.ts at master · rrweb-io/rrweb and confirmed it's Sentry customized logic.