mirror of
https://github.com/bevyengine/bevy
synced 2024-12-22 11:03:06 +00:00
f187d9c5fc
# Objective Reading system information severely slows down the update loop. Fixes #12848. ## Solution Read system info in a separate thread. ## Testing - Open the scene 3d example - Add `FrameTimeDiagnosticsPlugin`, `SystemInformationDiagnosticsPlugin` and `LogDiagnosticsPlugin` to the app. - Add this system to the update schedule to disable Vsync on the main window ```rust fn change_window_mode(mut windows: Query<&mut Window, Added<Window>>) { for mut window in &mut windows { window.present_mode = PresentMode::AutoNoVsync; } } ``` - Read the fps values in the console before and after this PR. On my PC I went from around 50 fps to around 1150 fps. --- ## Changelog ### Changed - The `SystemInformationDiagnosticsPlugin` now reads system data separate of the update cycle. ### Added - The `EXPECTED_SYSTEM_INFORMATION_INTERVAL` constant which defines how often we read system diagnostic data. --------- Co-authored-by: IceSentry <IceSentry@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |