adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306

High CPU consumption even with auto_refresh=False

Open
#48 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
72
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I noticed 100% CPU with my application on a Raspberry Pi, even I have several seconds sleep in my loop. I use auto_refresh = False

I can reproduce that behaviour with these modifications of examples/displayio_ssd1306_simpletest.py
```
from time import sleep
...
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=WIDTH, height=HEIGHT, auto_refresh=False)
...
display.auto_refresh = False # just to be sure

while True:
display.refresh()
sleep(5)
```
How can I bring down the CPU usage?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with examples/displayio_ssd1306_simpletest.py and reproduce the reported behavior using auto_refresh=False, display.refresh(), and sleep(5) on a Raspberry Pi. Investigate why CPU usage remains high despite the sleep; done means identifying the cause and documenting or implementing a way to reduce CPU consumption.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, raspberry-pi
Domain
embedded-iot, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.