-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM unusably slow even for a trivial example in Brave Browser #7242
Comments
This is due to how browser handles activity and the interaction with desktop mode. Browsers are very aggressive to trigger inactivity, and your wasm app will run at the slowest rate almost as soon as you don't move the mouse cursor |
Constantly moving the mouse cursor or pressing keys doesn't change anything. I also have the same effect with a more complex game where pressing keys can move a player character around. It very quickly drops down to an unusable number of FPS even when constantly moving the player character around. How is this supposed to be used? Anything I can change in my project setup or code to make it usable? |
How are you building? Is https://bevyengine.org/examples/games/breakout/ slow too? |
Oh it seems to be browser specific. I was using the Brave browser and both my example and the online Breakout example are unusably slow. With Chrome, both run better. Not sure why Brave slows it down so much. |
Super useful: can you note that this is Brave specific in the issue title? |
I presume you are using hardware acceleration in your browser? |
The "Use hardware acceleration when available" setting is enabled |
But since this seems browser specific, maybe the OS matters as well. It's
on PopOS Linux 22.04.
Let me know if you can/can't reproduce it on your machines. The breakout
example is very easy to check and compare perf between chrome and brave.
…On January 16, 2023 15:53:27 Ashy ***@***.***> wrote:
I presume you are using hardware acceleration in your browser?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
On my device which is:
However I will attempt to compile breakout myself in near future if required to thoroughly test it for potential performance drops in specific browsers. |
For me, breakout is slow even on the public website, no need to compile it myself. CPU: Intel(R) Core(TM) i9-7980XE CPU @ 2.60GHz I have the "hardware acceleration" setting enabled in Brave, but not sure if that means it uses the Nvidia card or whether it might be using the graphics card included in the CPU. I did just notice that webglreport.com in Brave says:
while Chrome says:
But I would assume the breakout example (and even more so the example I coded which doesn't actually display anything except for an fps counter) is simple enough that even the CPU internal graphics should be able to handle it well? |
Bevy examples will also report in the browser console which gpu it's using |
Browser console reports the same thing I saw in webglreport.com |
For me, using Google Chrome, the breakout example runs at 3 fps, on a Thinkpad X1 carbon. |
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:
The text was updated successfully, but these errors were encountered: