Add an example demonstrating how to load your assets sequentially to reduce memory usage on web platforms
- Lingua principale
- Rust
- Stelle
- 48.2k
- Fork
- 4.8k
- Merge medio
- 3g 16h
- PR unite (30g)
- 171
Descrizione
## 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando l’approccio al caricamento degli asset descritto in questo issue e l’API RenderAssetUsage, quindi leggi il contesto correlato nell’issue #12057. Il lavoro è completato quando un esempio carica gli asset in sequenza, sposta ciascuno sulla GPU con RenderAssetUsage e spiega perché questo riduce la memoria non reclamata sulle piattaforme web.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, wasm
- Ambito
- game-dev, performance
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100