Canvas memory leak in Safari
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend, performance
調査の方向性
Start with the linked rive-memory-leak reproduction and compare the heap snapshots after repeatedly mounting and unmounting @rive-app/react-canvas. Trace the canvas references retained by the React package in Safari; done means repeated remounts no longer leave extra canvas elements accumulating in memory.
索引モデルが issue の本文から書いたものです。
説明
Submission checklist
- I have confirmed the issue is present in the latest version of
@rive-app/react-canvasor@rive-app/react-webgl2(or the renderer variant I'm using) - I have searched the documentation and forums and could not find an answer
- I have searched existing issues and this is not a duplicate
Description
We are finding instances in our app of dangling references to canvas elements after rive elements have been unmounted. This is causing a growing memory problem that gets worse over time. It's definitely an issue in safari, possibly an issue in chromium based browsers but more difficult to reproduce.
I've created a repo that makes this reproducible - by mounting and un-mounting the rive component about 100 times I end up with two or three extra canvas elements in the memory snapshot. In our actual app with multiple different animations on various routes, we can sometimes see 10s or 100s of canvas elements accruing over time. With large animations this puts a real strain on memory and performance.
https://github.com/melodicdan/rive-memory-leak
Reproduction steps / code
https://github.com/melodicdan/rive-memory-leak
Atached are two heap snapshots, one with the single mounted canvas element and one after re-mounting ~100 times
Upload your reproduction files / stack trace
heap snapshot 1.json
heap snapshot 2.json
Rive React package version
"@rive-app/react-canvas": "^4.33.0",
Source .riv / .rev file
No response
Screenshots / video
No response
Browser & version
Safari 26.0.1
Operating system & version
macOS 15.7.1
Additional context
No response
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 58
- 平均マージ
- 52分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rive-app/rive-react のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
rive-app/rive-react#410 · コメント 1 件 ·
-
Fit.Layout doesn't reflow elements in canvas-lite対応中かも @usero-agent が 128 日前に担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
rive-app/rive-react#409 · コメント 3 件 ·
-
Issue: Re-mount RiveComponent multiple times cause web page laggy対応中かも @usero-agent が 128 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
rive-app/rive-react#400 ·
-
triage
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
rive-app/rive-react#392 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
rive-app/rive-react#386 · リアクション 1 件 ·
rive-app/rive-react の issue をすべて見る
似ている issue
-
ai-driven-qa bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
linagora/twake-contacts-frontend#241 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result countオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
priority:high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ahmedkhaleel2004/gitdiagram#228 ·