Add an example demonstrating how to load your assets sequentially to reduce memory usage on web platforms
- 主要言語
- Rust
- スター
- 48.2k
- フォーク
- 4.8k
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 171
説明
## What problem does this solve or what need does it fill?
On WASM, memory cannot be reclaimed / freed. As a result, loading all of your assets up front in a loading-screen pattern will balloon your memory usage and it will never go back down. See https://github.com/bevyengine/bevy/issues/12057 for more context.
## What solution would you like?
Add an example demonstrating how to load assets one at a time, and then moving them onto the GPU using `RenderAssetUsage` once loaded.
Explain why this is useful for web.
## What alternative(s) have you considered?
We could make this the default behavior on wasm.
## Additional context
This came up when helping a commercial user debug performance issues on iOS.
コントリビューションガイド
調査の方向性
まず、この issue で説明されているアセット読み込みのアプローチと RenderAssetUsage API を確認し、次に issue #12057 の関連するコンテキストを読んでください。完了の条件は、例がアセットを順番に読み込み、それぞれを RenderAssetUsage で GPU に移し、これによって Web プラットフォーム上の解放されていないメモリが減少する理由を説明することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust, wasm
- 領域
- game-dev, performance
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100