-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedDS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)
Description
Description
I'm using new version 0.31.0-beta.2
I did not try with another version.
I use wgpu in Fifo present mode.
Each frame I display:
RedrawRequested delta: the time between two RedrawRequested receptions.game logic elapsed: the time to handle all my code between two RedrawRequested receptions.
RedrawRequested emission is quite regular, but very long on WASM, 60 FPS unreachable.
Maybe I'm wrong but I suppose the browser is throttling the application even though the tab is focused and I'm using it.
I couldn't investigate more.
Is that a winit bug ?
Native:
Event loop setup:
let event_loop = EventLoop::new().unwrap();
event_loop.set_control_flow(ControlFlow::Poll);
event_loop.run_app(Game::empty()).unwrap();DEBUG game: RedrawRequested delta: 16ms894µs968ns
DEBUG game: game logic elapsed: 4ms695µs704ns
...
Web - Firefox:
Event loop setup:
let event_loop = EventLoop::new().unwrap();
event_loop.set_control_flow(ControlFlow::Poll);
event_loop.set_poll_strategy(PollStrategy::Scheduler); //already by default
event_loop.run_app(Game::empty()).unwrap();DEBUG game: RedrawRequested delta: 82ms
DEBUG game: game logic elapsed: 5ms
...
Tested browsers
Firefox
Tested devices
Laptop ubuntu 22
Winit version
0.31.0-beta.2
Metadata
Metadata
Assignees
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedDS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)