Add an example demonstrating how to load your assets sequentially to reduce memory usage on web platforms
- Vorherrschende Sprache
- Rust
- Sterne
- 48.2k
- Forks
- 4.8k
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 171
Beschreibung
## 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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, den in diesem Issue beschriebenen Ansatz zum Laden von Assets und die RenderAssetUsage API zu überprüfen, und lies anschließend den zugehörigen Kontext in Issue #12057. Als erledigt gilt, dass ein Beispiel Assets sequenziell lädt, jedes mit RenderAssetUsage auf die GPU verschiebt und erklärt, warum dies nicht freigegebenen Speicher auf Webplattformen reduziert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust, wasm
- Bereich
- game-dev, performance
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100