Skip to content

Conversation

@ShinyChang
Copy link

Background

I followed Set Up Session Replay | Sentry for Javascript and got CPU high usage.

CleanShot-2024-07-10-at-15 22 35@2x

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.

@billyvg billyvg merged commit 781b2a1 into getsentry:sentry-v2 Aug 15, 2024
billyvg added a commit to getsentry/sentry-javascript that referenced this pull request Aug 27, 2024
* [fix(rrdom): Ignore invalid DOM attributes when diffing](getsentry/rrweb#213)
* [fix: manual snapshot in rAF loop](getsentry/rrweb#210) (thanks @ShinyChang)
* [feat: Fix blocking dynamically added iframes](getsentry/rrweb#212)
billyvg added a commit to getsentry/sentry-javascript that referenced this pull request Aug 27, 2024
* [fix(rrdom): Ignore invalid DOM attributes when
diffing](getsentry/rrweb#213)
* [fix: manual snapshot in rAF
loop](getsentry/rrweb#210) (thanks @ShinyChang)
* [feat: Fix blocking dynamically added
iframes](getsentry/rrweb#212)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants