qr-scanner icon indicating copy to clipboard operation
qr-scanner copied to clipboard

Error

Open tiuvi opened this issue 2 years ago • 3 comments

The qrScanner object has a memory leak only because it remains open and it is necessary to destroy it, they happen to me in chrome and linux ubuntu.

tiuvi avatar Sep 19 '22 06:09 tiuvi

I think the error is in this line, new workers are being created every time it is scanned, when you use the scan it is assumed that the service worker should already be active.

image My strong point is not typescript if I could not help you solve it, you have to see if new workers are being initialized

tiuvi avatar Sep 19 '22 06:09 tiuvi

Creo que solucionado el problema de la creación de workers.

image

image

image And speed in 4 or saturate mobile or computer.

tiuvi avatar Sep 19 '22 08:09 tiuvi

The problem is that a new worker is created every time you have to process a frame and obtain the QR code, you have to create a single worker to send messages with the frames, the worker has to make a queue with the frames, check if it is QR and after sending a message if a QR with the data has been detected. However, when creating a worker for each frame in one second, 30 workers are created, multiplied by the number of seconds that the camera is initialized. I would fix it but I don't have time to rewrite part of the code.

tiuvi avatar May 04 '24 17:05 tiuvi