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

The in browser demo runs very slow in mobile phone browser. #4

Open
ashutalewar opened this issue Nov 8, 2019 · 5 comments
Open

The in browser demo runs very slow in mobile phone browser. #4

ashutalewar opened this issue Nov 8, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@ashutalewar
Copy link

ashutalewar commented Nov 8, 2019

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?

@jjhbw
Copy link
Owner

jjhbw commented Nov 8, 2019

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 Performance is not fantastic yet....

@jjhbw jjhbw added the enhancement New feature or request label Nov 10, 2019
@josephernest
Copy link

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?

@jjhbw
Copy link
Owner

jjhbw commented Feb 11, 2020

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.

@maslick
Copy link

maslick commented Apr 9, 2021

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
[2] https://qr.maslick.tech

@jjhbw
Copy link
Owner

jjhbw commented Apr 11, 2021

@maslick very nice work! Thanks for posting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants