-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile timesO-MacOSSpecific to the MacOS (Apple) desktop operating systemSpecific to the MacOS (Apple) desktop operating systemP-HighThis is particularly urgent, and deserves immediate attentionThis is particularly urgent, and deserves immediate attentionS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Description
Summary
On MacOS, even simple Bevy apps cause very high CPU load; for example, even a blank app that just loads DefaultPlugins
to render a blank window sits at ~50% CPU usage on an Apple Silicon M1. Add a couple of rendered meshes and postprocessing and it'll quickly go up to about ~90% CPU.
On Windows and Linux, the same app will comfortable sit below 1% (even with some light rendering.)
Additional notes:
- A MRP has been provided here.
- It uses the
opt-level = 3
etc. trick from the docs. - Compiling a
--release
build doesn't make a difference. - In addition, when hiding the app, CPU load doubles, but I understand there have already been issues filed about this particular problem.
Bevy version
0.11.3
(but I also tried 66f72dd
, the newest commit on main
at the time.)
Relevant system information
- Rust 1.73.0
- MacOS Sonoma 14.0
AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
SystemInfo { os: "MacOS 14.0 ", kernel: "23.0.0", cpu: "Apple M1", core_count: "8", memory: "16.0 GiB" }
What you did
- Build a "blank" Bevy app (code available here)
- Compile and run it
What went wrong
Expected behavior: the app should cause CPU load in the single-digit percentage range, like it does on Windows (<1% CPU, on a Ryzen 7.)
Actual behavior: the app caused ~50% CPU load.
splashdust, jjyr, maun, Zajozor, jthacker and 12 moreThierryBerger and For-December
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile timesO-MacOSSpecific to the MacOS (Apple) desktop operating systemSpecific to the MacOS (Apple) desktop operating systemP-HighThis is particularly urgent, and deserves immediate attentionThis is particularly urgent, and deserves immediate attentionS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong