Use WinitSettings::desktop_app in editor template to reduce CPU usage#258
Open
theotherphil wants to merge 3 commits into
Open
Use WinitSettings::desktop_app in editor template to reduce CPU usage#258theotherphil wants to merge 3 commits into
theotherphil wants to merge 3 commits into
Conversation
jbuehler23
reviewed
May 21, 2026
| .add_plugins(EditorPlugins::default()) | ||
| .add_plugins({{crate_name}}::MyGamePlugin); | ||
| .add_plugins({{crate_name}}::MyGamePlugin) | ||
| .insert_resource(WinitSettings::desktop_app()); |
Owner
There was a problem hiding this comment.
you will likely need to add this to all templates - dylibs, extensions, etc
Contributor
There was a problem hiding this comment.
Wouldn't you want to add this to the editor itself ? rather than templates ?
(I'm ok with adding it to templates but I feel it would benefit more in the editor itself ?
oh that is the template for a standalone editor for a project 🤯 👍
Actually, if the editor embeds the main game, would it be a risk to have stutter when "play in editor" mode ? it would need to switch mode ?
Owner
There was a problem hiding this comment.
yes i think this be baked into the editor itself i think
Azorlogh
approved these changes
May 21, 2026
jbuehler23
requested changes
May 25, 2026
jbuehler23
left a comment
Owner
There was a problem hiding this comment.
@janhohenheim do you think we should add this into the editor plugins?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Editor CPU usage is currently extremely high on MacOS - pinned at ~100% of a CPU code whether the window is focused or not.
Update the editor template to use
WinitSettings::desktop_appas recommended on bevyengine/bevy#10261.Testing: ran it on my MacBook.... that's it!