fix: allow rrweb to control full snapshots #945
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
In #847 we started taking a full snapshot every ten minutes. a common perf improvement. In long recordings we've seen seeking in replay perform poorly because we don't take full snapshots more than once in many recordings.
In #860 we reverted that because it was clashing with the full snapshots we were taking on return from idle.
It occurred to me #860 was the wrong change. If rrweb is taking snapshots on return from idle when checkoutEveryNms is set and that's what we want then we can remove our attempt to take a full snapshot on return from idle
TODO
This is tricky to test since we rely on full snapshots being taken when we return from idle (although I believe this is failing in many cases because we're trying to take the snapshot before rrweb is ready) and we rely on a full snapshot when we rotate the session id
So, we probably need an integration test for those two cases that show we capture two sessions each with a full snapshot
Checklist