[BUG] Screen Lag every second #19
Comments
Hi @TurKurT656. Your welcome! Is there a particular block of code which makes you think the lib is processing bitmaps on the main thread? I admit it's been a little while since being deep in this code, but I thought I had made everything threaded correctly. |
no, i double checked everything. yes everything works fine but with lag (almost every 2sec) |
i found the problem: |
I think I have identified that this line is causing some dropped frames: It appears that on some devices this call can be quite intensive and therefore cause jumps. I will have a think about a solution. |
I have attempted a solution on this branch: https://github.com/brightec/KBarcode/tree/fix/Lag. I add Kotlin Coroutines as a dependency in order to aid with the threading. And then made @TurKurT656 Fancy taking a look and seeing if this performs better on your devices too? |
@alistairsykes Ok i will test application with this branch and see if lag problem fixed. |
Closing for inactivity. Hopefully that did solve your issue. |
srry for the delay, yes it is fixed on this version |
Describe the bug
First of TnQ for this great lib. its simple and completely a clean solution.
However There i an annoying bug. When camera shows up screen lags periodically every second. I think the problem is that you are processing bitmap on the main thread and when the device config is weak this bug happens.
To Reproduce
Run this lib on the mid level devices
Expected behavior
Camera must work without lag and calculating and processing must be in background thread
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: