Memory leak / lack of GC on Android Chrome when using workerize-loader
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- android, javascript, react, webpack
- 領域
- mobile-dev, performance, web-dev
調査の方向性
まず、リンクされた CodeSandbox を Android Chrome で使用してメモリ増加を再現し、その後 /src/components/qreader-zxing.js と /src/workers/zxing.worker.js を調査します。報告されている Android Chrome DevTools のメモリスナップショットと chrome://tracing の観察結果を使用して、この挙動がサンプル、ワーカー通信、ブラウザーのいずれによって引き起こされているのかを特定します。完了には、原因の確認と、明確に実行可能な修正または upstream への報告が必要です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 2.3k
- フォーク
- 85
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
developit/workerize-loader のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
developit/workerize-loader#131 · コメント 6 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
developit/workerize-loader#130 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
developit/workerize-loader#129 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
developit/workerize-loader#128 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
developit/workerize-loader#126 · コメント 4 件 ·
developit/workerize-loader の issue をすべて見る
似ている issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·