Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: manual snapshot in rAF loop #210

Merged
merged 2 commits into from
Aug 15, 2024
Merged

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
7 checks passed
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