Skip to content

Use vectorio instead of bitmap #11

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

Closed
wants to merge 4 commits into from

Conversation

FoamyGuy
Copy link
Contributor

This changes the way the progress bar is drawn to use vectorio.Polygon objects. It results is less memory usage.

Running on PyPortal the simpletest with a print mem_alloc() added I get these results:

Current release mpy:
mem_alloc 155232

Version from this PR:
mem_alloc 15136

Anecdotally it seems like erasing back to 0 progress is faster than before, but I can't be sure.

@FoamyGuy
Copy link
Contributor Author

These changes would make the library incompatible with Circuit Python version 5.x.

It is probably worth giving some additional thought to this, and perhaps adding backward compatibility that uses the bitmap approach.

@FoamyGuy
Copy link
Contributor Author

After thinking this over a bit more I think it makes the most sense to keep vectorio out of this ProgressBar library for now.

There are other potential improvements noted in #10 that won't remove compatibility with 5.x versions. Those are better candidates for the short term.

For now I will plan to create a separate library Vector_ProgressBar that will use the vectorio implementation. That way it's available for anyone that wants it, and it won't make the logic in this library more complex

@FoamyGuy FoamyGuy closed this Jul 25, 2020
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.

1 participant