-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Return early for child same origin frames #1295
Conversation
🦋 Changeset detectedLatest commit: ff62961 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
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 |
@Juice10 any chance you can take a look here as you had context on the original slack question? |
@Juice10 anything that might need to be done here to get this minor change in? |
0538b09
to
82fc65d
Compare
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.
236c206
to
ff62961
Compare
@colingm Can you repost or screenshot the original issue here? The message in the slack channel is no longer available to us. |
@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 |
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