Memory leak / lack of GC on Android Chrome when using workerize-loader
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- android, javascript, react, webpack
- Ambito
- mobile-dev, performance, web-dev
Direzione di ricerca
Inizia riproducendo la crescita della memoria con il CodeSandbox collegato su Android Chrome, quindi esamina /src/components/qreader-zxing.js e /src/workers/zxing.worker.js. Usa gli snapshot della memoria di Android Chrome DevTools riportati e le osservazioni di chrome://tracing per determinare se il comportamento è causato dall’esempio, dalla comunicazione con il worker o dal browser; il lavoro è completato solo quando la causa è confermata ed è disponibile una correzione chiaramente attuabile o un report upstream.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
First of all - thank you for a fantastic library to make web workers usable for more complex things :)
Not sure this is the right place to ask, but would appreciate some advice if anyone have seen similar problems before.
I have a project setup where I am pushing 35 MB/sec (10fps 1280x720) from a webcam feed to a worker set up by workerize-loader to search for QR codes in the image data (using HTML5 canvas).
This seems to work fine most of the time - the worker heap grows quickly according to memory snapshots in Chrome DevTools but is garbage collected frequently enough for Chrome to handle. The exception here is Android Chrome.
Memory snapshots on Android / Chrome Devtools show worker heap is frequently GC'ed (varies from 1.3MB to >100MB and back to 1.3MB) but then "suddenly" is not anymore (>500MB heap) and Chrome crashes.
Looking at chrome://tracing with an Android phone connected shows available memory dropping continuously until things crash - the memory freed from the worker heap during GC is not shown as available in chrome://tracing.
Is there anything with the promise/event mechanism between the main thread and the worker that could make things not being garbage collected? Or could this be simply a Chrome bug on Android? Do I have a bug on my side? ¯_(ツ)_/¯
Sample project (Gatsby and React for now, soon Preact):
https://codesandbox.io/s/1di20
Relevant files are /src/components/qreader-zxing.js and /src/workers/zxing.worker.js
- Lingua principale
- JavaScript
- Stelle
- 2.3k
- Fork
- 85
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di developit/workerize-loader
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
developit/workerize-loader#131 · 6 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
developit/workerize-loader#130 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
developit/workerize-loader#129 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
developit/workerize-loader#128 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
developit/workerize-loader#126 · 4 commenti ·
Tutte le issue di developit/workerize-loader
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Improve Title Support Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·