Add an example demonstrating how to load your assets sequentially to reduce memory usage on web platforms
- 主要语言
- Rust
- 星标
- 48.2k
- 派生
- 4.8k
- 平均合并
- 3 天 15 小时
- 30 天内合并 PR
- 168
描述
## 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