Merged
Conversation
We were seeing issues getting into an infinite loop calling `splice` to reset actions (I believe only with large action sets). Replacing the array completely seems to get around this issue.
Vadman97
approved these changes
May 15, 2025
Vadman97
pushed a commit
to highlight/highlight
that referenced
this pull request
May 15, 2025
## Summary A few optimizations to the session replayer: * Changes how rrweb replaces actions by completely replacing the array rather than using `splice` to reset it. This seems to fix an infinite loop we were seeing, though probably has some tradeoffs with creating a new array rather than reusing the existing. * Filters out custom events before passing events to rrweb since those are only used on the timeline, not for replay. * Adds some mechanisms for creating many track events at once and viewing very large DOM trees to test those scenarios in recording/replay. * Prevents Stripe from loading when any page is rendered in our app and lazy loads it only when needed on the update plan page. ## How did you test this change? Click tested locally and in the Reflame preview, which included the rrweb updates. Compared prod session viewing to the app preview for some sessions that had obvious playback issues. ## Are there any deployment considerations? * Need to release highlight/rrweb#122 and update rrweb in this PR before merging. * Will need to follow up with customers to let them know replay should be better (see Jira ticket for details on who to contact). ## Does this work require review from our design team? N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We were seeing issues getting into an infinite loop calling
spliceto reset actions (I believe only with large action sets). Replacing the array completely seems to get around this issue.