-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Reduce iOS cpu usage #16548
Reduce iOS cpu usage #16548
Conversation
Prompted by #16541, but not a full fix. See that thread for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good fix given the part of the release cycle we're in. There's definitely something fundamentally wrong with how winit / Bevy is interacting with iOS here though.
That's a second approval. Merging :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Looks good to me
@@ -34,6 +35,9 @@ fn main() { | |||
..default() | |||
}), | |||
) | |||
// Make the winit loop wait more aggressively when no user input is received | |||
// This can help reduce cpu usage on mobile devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth mentioning that this can and is encouraged to use to set desired refresh rate based on the games requirements: low rate fine in a menu and high during interactive gameplay for example
# Objective - Avoid recreating the monitor every loop (temp fix until it's done properly on winit side) - Add a new `WinitSettings` preset for mobile that makes the winit loop wait more and recommend its usage
# Objective - Avoid recreating the monitor every loop (temp fix until it's done properly on winit side) - Add a new `WinitSettings` preset for mobile that makes the winit loop wait more and recommend its usage
Objective
WinitSettings
preset for mobile that makes the winit loop wait more and recommend its usage