rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

Return early for child same origin frames

Open colingm opened this issue 1 year ago • 4 comments

If we have cross origin record turned on but we are in a child frame that has the same origin as its parent we end up in sort of an inefficient state. We will start the recording, record mutations, but then never actually emit them anywhere since inEmittingFrame and passEmitsToParent are both false. This is a waste of resources and we might as well just never start the recording.

Brought this up in slack: https://rrweb.slack.com/archives/C01BYDC5C93/p1692810269238919

colingm avatar Aug 30 '23 18:08 colingm

🦋 Changeset detected

Latest commit: ff629616b23c162e2a3e6a1ae77c397396efa6d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Aug 30 '23 18:08 changeset-bot[bot]

@Juice10 any chance you can take a look here as you had context on the original slack question?

colingm avatar Oct 24 '23 18:10 colingm

@Juice10 anything that might need to be done here to get this minor change in?

colingm avatar May 01 '24 17:05 colingm

@colingm Can you repost or screenshot the original issue here? The message in the slack channel is no longer available to us. This PR actually looks good to me. I'm willing to merge this in.

YunFeng0817 avatar May 27 '24 02:05 YunFeng0817

@YunFeng0817 yeah I don't have access to the exact text but my first comment/description for the PR explain the same thing I explained in slack. In slack I just brought up that idea and @Juice10 said yeah that it is kind of wasteful to keep same origin child frames running if you have cross origin recording turned on

colingm avatar May 28 '24 13:05 colingm