adafruit / adafruit/Adafruit_CircuitPython_PortalBase

Optimizing PortalBase

Open
#59 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Sooo, PortalBase was never optimized. Thus it has gotten a bit bloated. It was designed with compatibility of old code in mind, and to that end it succeeded, but the library could be revamped to be smaller and more functional. I actually didn't think it would be used as heavily when I originally made a version for the MatrixPortal and then the other boards.

One of the major problems with the bloat is that it pushes many of the boards to their memory limits and I currently have a PR in place to freeze the library into CircuitPython. However, by making it smaller, this would free up some room on there.

Some of optimizing would be doing things like stripping out debug which is really unnecessary at this point and was a holdover from the original PyPortal library. Other things would be stripping out things like the "init everything at once approach" that was also a holdover from the original PyPortal library. It would mostly be writing the code to be more efficient and would likely be largely the same to the average user. I do really like the approach that was made with most of the boards in terms of adding text and would likely stick with that for the most part.

Before doing anything with this, I would like to hear other people's opinions.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the PortalBase library and its board-facing implementation to identify the retained debug code and the init-everything-at-once approach described in the issue. Review the open compatibility and memory constraints before proposing changes. Done should mean a smaller, more memory-efficient library that preserves the existing user-facing behavior, with agreement on the direction first.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.