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

smol sleep inside background loop #143

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FoamyGuy
Copy link
Contributor

Intended to resolve: adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306#48

This while True: loop runs very fast and revs one of the CPU cores even while the display isn't being refreshed. A tiny sleep inside of it appears to keep the CPU usage much lower watching htop while doing import displayio in REPL and running ssd1306 simpletest.

Needs more robust testing still, so far I've only used it on SSD1306 for a quick proof of concept and to check htop. I'll mark this as ready once I've tested SPI displays and more thoroughly in general.

@makermelissa does it make sense to you to have a small sleep inside of this background loop?

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.

High CPU consumption even with auto_refresh=False
1 participant