qr-scanner
qr-scanner copied to clipboard
Error
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.
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.
My strong point is not typescript if I could not help you solve it, you have to see if new workers are being initialized
Creo que solucionado el problema de la creación de workers.
And speed in 4 or saturate mobile or computer.
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.