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

Optimize ScrollingLabel update logic to prevent redundant text updates #210

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

shubham0x13
Copy link
Contributor

Introduces a check to prevent _set_text from being called with unchanged content/text.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Thanks for the improvement @shubham0x13!

This looks good to me, I did a quick test on a Feather S3 TFT to confirm the new version now does not call _set_text when the text hasn't changed.

@FoamyGuy FoamyGuy merged commit 3ba5f74 into adafruit:main Nov 2, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 3, 2024
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.

2 participants