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: change screenshots debouncing approach to throttling #214

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Dec 13, 2024

💡 Motivation and Context

Using throttling instead of debouncing, similar to iOS and Flutter now.

💚 How did you test it?

📝 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.

@marandaneto marandaneto requested a review from a team December 13, 2024 12:39
@marandaneto
Copy link
Member Author

@ioannisj would be cool to do the same on iOS if not throttling yet

@ioannisj
Copy link

@ioannisj would be cool to do the same on iOS if not throttling yet

iOS implementation is using a timer currently. When the timer fires we check if layoutSubviews was called (which would signal that something changed on the screen). So not debouncing, kind of throttling. This means, however, that the timer is still active even when the app is idle which can be improved (we just ignore if layoutSubviews was not called). Also, configuration option is still debouncerDelay which is a bit misleading. I can revisit the approach and ship a minor version along with start/stop recording

@marandaneto marandaneto marked this pull request as ready for review January 7, 2025 11:06
Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

👍

Copy link

@ioannisj ioannisj left a comment

Choose a reason for hiding this comment

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

👍

@marandaneto marandaneto merged commit 6e11b6c into main Jan 7, 2025
9 checks passed
@marandaneto marandaneto deleted the chore/throttleDelay branch January 7, 2025 12:14
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.

3 participants