bevyengine / bevyengine/bevy

WASM unusably slow even for a trivial example in Brave Browser

Open
#7,242 13 comments 0 reactions 0 assignees View on GitHub
C-Performance O-Web
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.