Skip to content
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

[Enhancement] Live preview speedup #413

Merged
merged 9 commits into from
Jul 31, 2023

Conversation

kdmukai
Copy link
Contributor

@kdmukai kdmukai commented Jul 25, 2023

Due do slower rendering times in SeedSigner OS (full-screen updates are noticeably slower), we need to optimize the ScanScreen live preview as much as possible. Current dev branch is only rendering the live preview at about 1.6 fps for the live display and 3.1 fps for the QR decoder in SeedSigner OS (see my benchmarking branch to get an onscreen fps display).

In my testing, this PR gets a Pi Zero running SeedSigner OS up to about 3.3 fps for the live preview and a coincidental 3.3 fps for the QR decoder.

On Raspi OS, I've seen this same code range from 4.6fps display / 3.8 fps decode to 3.5 fps display / 4.6 fps decode.

@jdlcdl
Copy link

jdlcdl commented Jul 25, 2023

On my pi2...

Baseline w/o this pr.
RaspiOS: 4.5 fps display / 10.9 fps decode
seedsigner-os: 3.2 fps display / 6.5 fps decode

With this pr:
RaspiOS: 8.4 fps display / 9.3 fps decode
seedsigner-os: 6.3 fps display / 6.3 fps decode

Display framerate almost double, decode framerate slightly slower.

All measures above done with your dev_livepreview_benchmarking branch merged in.
At first glance, I did sense that this pr was an improvement, but I wouldn't have guessed it was 2x.
Your benchmarking branch sure would be nice to have, w/ onscreen fps visible, in a way where we could turn it on with a hidden setting, maybe thru a SettingsQR?

@newtonick
Copy link
Collaborator

ACK Tested

I did some large PSBT scans comparing decoding performance and did not notice any difference.

@newtonick newtonick merged commit 5803382 into SeedSigner:dev Jul 31, 2023
@newtonick newtonick added this to the 0.7.0 milestone Jul 31, 2023
@kdmukai kdmukai deleted the livepreview_speedup branch September 2, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants