WASM unusably slow even for a trivial example in Brave Browser
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
I've created a very simple example that just adds a 2d camera and shows an fps counter. Running it as a desktop app is fine and shows 60 FPS. But when trying to run it in a browser with WASM (using wasm-server-runner), it hovers around 30 FPS for a couple seconds and then drops down to 5 FPS where it stays.
Why is this so slow? This is a trivial example that isn't really doing anything except for showing the FPS counter. Anything I can do to make it faster?
Code: https://github.com/smessmer/bevy-wasm-test
Run with:
```
cargo install wasm-server-runner
cargo run --release --target wasm32-unknown-unknown
```
Contributor guide
Research direction
Start with the linked smessmer/bevy-wasm-test reproduction and run the provided cargo command in Brave. Compare its desktop and WASM frame rates, then investigate why the trivial example drops from about 30 FPS to 5 FPS. Done means identifying the cause and a concrete fix or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- game-dev, performance, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100