-
Notifications
You must be signed in to change notification settings - Fork 19
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
The in browser demo runs very slow in mobile phone browser. #4
Comments
Great question. Performance is actually one of the most important issues with this proof-of-concept. I've actually discussed potential approaches to improve this at the very end of the blog post accompanying this repo.. See the part below |
Congrats for this project @jjhbw ! I tried it on a Samsung Galaxy smartphone and it is very slow indeed (1 fps or maybe 0.5 fps), and on my i5 laptop too. Do you think improvements of these last years about Wasm could improve the performance? |
Interesting question, I would love to know about that too. You could try recompiling with the latest version of Emscripten to see if compiler/wasm improvements help. However, I expect the most important bottlenecks to be inherent to the architecture. I haven't profiled it, but I expect that a lot of time is spent on copying image buffers from the canvas into webassembly land. You could also look into flipping some of Zbar's (compile-time) switches to see if you can trade some fidelity or unused features for extra speed. |
Hey guys @josephernest and @jjhbw! I have extracted the QR recognition code into a WebWorker. You can try this demo and check the performance on your devices ;) [1] https://github.com/maslick/koder |
@maslick very nice work! Thanks for posting it. |
The demo works perfectly fine in the laptop browser but in mobile phone browser its lagging too much. I tried optimizing by using service workers but couldn't see much improvement.
Are there any ways to improve the performance in the mobile browser?
The text was updated successfully, but these errors were encountered: