adafruit / adafruit/Adafruit_CircuitPython_ProgressBar

ProgressBar could use less memory, operate more efficiently

Open
#10 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
8
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The ProgressBar is a 1×1 tilegrid configured to display a W×H bitmap. Instead, it could be a W×1 tile grid, displaying 1×H slices from a 3×H bitmap.

Three tall elements are needed: One which is entirely the outline color; one which is the outline color at the top and bottom and transparent/black in the middle, and one that is the outline color at the top and bottom and the bar color in the middle.

This should reduce memory consumption (from W×H to W+3×H times some constant) and speed updates, since a progress change P pixels wide would only have to update P tilegrid entries instead of P×H bitmap entries. (however, the amount of data actually sent over SPI/I2C to the display would not change)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the ProgressBar implementation and trace how its tilegrid and bitmap are created and updated. Compare the current memory use and progress-update path with the proposed W×1 tile grid and 1×H slices. Done means the display remains visually equivalent while using the proposed lower-memory representation and updating only the affected width.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
39/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.