Add an example demonstrating how to load your assets sequentially to reduce memory usage on web platforms
- Ngôn ngữ chính
- Rust
- Star
- 48.2k
- Fork
- 4.8k
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 171
Mô tả
## 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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem xét cách tiếp cận tải asset được mô tả trong issue này và API RenderAssetUsage, sau đó đọc ngữ cảnh liên quan trong issue #12057. Được xem là hoàn thành khi một ví dụ tải các asset tuần tự, chuyển từng asset lên GPU bằng RenderAssetUsage và giải thích tại sao điều này làm giảm lượng bộ nhớ chưa được giải phóng trên các nền tảng web.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust, wasm
- Lĩnh vực
- game-dev, performance
- Loại issue
- Tài liệu
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100