Description
Hello,
Describe the bug
I noticed on macOS 15.3.2 on my MacBook Pro M2 and with the latest egui state (github) that when launching the executable (cargo build --release
) by double clicking it, the CPU usage rises to 50%+ when the app is partially covered.
To Reproduce
-
macOS:
cargo build --release -p egui_demo_app
-
and then double click the executable to launch.
-
Move with the cursor over the egui UI to trigger a redraw.
Note that it does not happen when the app is in the foreground:
This also does not happen when the executable is launched with
cargo run --release -p egui_demo_app
or
./egui_demo_app
Expected behavior
CPU usage should be the same, no matter how it is launched
Desktop (please complete the following information):
- OS: macOS 15.3.2
- Version: 0.31 (latest GitHub state)
Additional context
It also happens if the application is bundled with cargo bundle
and the resulting .app
is double-clicked.
EDIT: It does not happen with the winit
example application.rs
of the latest release and also not with its window.rs
example of winit=0.30.1
.
No difference if using wgpu
instead of glow
. (wpgu
seems slightly worse, about 5-10% more CPU load)
EDIT 2: The debugging info of the demo app also shows 1 ms / frame when I see a low CPU usage (window in front). and 2 ms / frame when I see a high CPU usage (window in background / partially covered)