Performance improvements through less SD usage (mostly pwnagotchi.png and logging)#356
Open
Sniffleupagus wants to merge 36 commits intojayofelony:noaifrom
Open
Performance improvements through less SD usage (mostly pwnagotchi.png and logging)#356Sniffleupagus wants to merge 36 commits intojayofelony:noaifrom
Sniffleupagus wants to merge 36 commits intojayofelony:noaifrom
Conversation
…e. much better performance
…old 'false' behavior
…element xy. commented out possibly unneeded alpha check
…le image. scale without aliasing. center image in bounding box. Do not reload the same image over and over
Contributor
Author
|
I've added more stuff since submitting. Changed faces mod stuff to scale images (like neon's PR), but also scales to fit a defined box on screen maintaining aspect ratio, centering image in box. |
Add _display pointing at self to be compatible with plugins that look at _display
…rent behavior of updating the image everyt ime
Contributor
Author
|
Bloated. I'm splitting it out into separate PRs. :) |
…kworm into no-png-file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stops saving the UI to a file every update, and serves it from memory instead. Improves update performance.
Also adds syslog logging (journalctl -fu pwnagotchi) and disabling log files by setting config.toml values to "".
Faces mod improvements to image sizing and scaling. Slight performance increase on updates when face has not changed.
Description
view.py copies the _canvas to _web_canvas after doing all of the drawing. web/handler.py has been changed to pull the _web_canvas image and serve it up through memory stream instead of saving as a file.
Motivation and Context
Solves wear and tear on SD and unnecessary SD usage. Improves cpu "wait" times.
Fixes an issue where large dummy displays spend a lot of time saving the pwnagotchi.png and occupying the filesystem.
How Has This Been Tested?
Tested on noai branch of jayofelony (forked into no-png-file branch), and on banangotchi
Tested using an existing 2.9.5-3 pwnagotchi, editing the files in place. Then cloned a fresh copy of the repo and made a branch, ,testing against the cloned repo.
It does not affect other code, unless something outside pwnagotchi code depends on that image.
Types of changes
Checklist:
git commit -s