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

chore: do not send repeated snapshots #126

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Dec 4, 2024

💡 Motivation and Context

do not send repeated snapshots if nothing changed

💚 How did you test it?

running sample and being sure that the screen should or not match the last snapshot

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

return;
}

if (const PHListEquality().equals(pngBytes, _lastSnapshot)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

hard to tell the performance impact of that, can move to a background thread on the native side if needed

@marandaneto marandaneto requested a review from a team December 4, 2024 13:10
@marandaneto marandaneto marked this pull request as ready for review December 4, 2024 13:11
Comment on lines +105 to +116
case 'sendMetaEvent':
// not supported on Web
// Flutter Web uses the JS SDK for Session replay
break;
case 'sendFullSnapshot':
// not supported on Web
// Flutter Web uses the JS SDK for Session replay
break;
case 'isSessionReplayActive':
// not supported on Web
// Flutter Web uses the JS SDK for Session replay
break;
Copy link
Member Author

Choose a reason for hiding this comment

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

flyby fix, missed it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant