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

feat: safer rrweb events and regular full snapshots #973

Merged
merged 6 commits into from
Jan 28, 2024

Conversation

pauldambra
Copy link
Member

regular full snapshots

we currently only take a full snapshot at the start of a recording or on return from idle

so if someone has an active and complex 20 minute recording we accrue 20 minutes of incremental snapshots. this has performance impact on playback and on seeking

instead now, when we start recording we set an interval to take another full snapshot in 5 minutes

if we see a fullsnapshot before that we reset the timer, so that we would take a full snapshot 5 minutes after that

safer rrweb events

we believe we are missing full snapshots and custom events - maybe on return from idle

this adds a simple in-memory queue so that if we cannot take one of these triggered events, we will retry the next time rrweb emits an event

it also adds a custom event to report this happened so that we can track how often and by how much this is happening (cos it might not help 🤷)

Copy link

github-actions bot commented Jan 27, 2024

Size Change: +3.69 kB (0%)

Total Size: 766 kB

Filename Size Change
dist/array.full.js 180 kB +923 B (+1%)
dist/array.js 121 kB +923 B (+1%)
dist/es.js 121 kB +923 B (+1%)
dist/module.js 121 kB +923 B (+1%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12 kB
dist/recorder-v2.js 104 kB
dist/recorder.js 58.5 kB
dist/surveys.js 48.7 kB

compressed-size-action

@pauldambra pauldambra requested a review from a team January 27, 2024 15:25
@pauldambra pauldambra added the bump patch Bump patch version when this PR gets merged label Jan 28, 2024
Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments but LGTM.
If we see that this improves something (eg player performance) or at least helps us debug things, I can do the very same on Mobile.

@pauldambra pauldambra merged commit f4e3a0a into master Jan 28, 2024
13 checks passed
@pauldambra pauldambra deleted the fix/a-hammer-to-crush-a-nut branch January 28, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants