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

Native BarcodeDetector API performance is bad #237

Open
jvhellemond opened this issue May 27, 2023 · 1 comment
Open

Native BarcodeDetector API performance is bad #237

jvhellemond opened this issue May 27, 2023 · 1 comment

Comments

@jvhellemond
Copy link

jvhellemond commented May 27, 2023

☝️ This is more of a tip than an issue:

The performance of the native BarcodeDetector API 1 can be pretty bad 2, causing animations while scanning to be very choppy. Reducing the maximum number of scans per second helps, a bit. Disabling (or removing) window.BarcodeDetector (before calling .start()) makes QrScanner load the worker script and do its detecting there:

delete window.BarcodeDetector;

1: Chrome on non-M1/M2 macOS or Chrome OS or Android only, for now
2: In Chrome on my non-M1/M2 Macbook Pro at least, #YMMV

@DonkeyBear
Copy link

Thanks bro, this tip saves my ass 🥹

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

No branches or pull requests

2 participants