8000 GitHub · Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
High CPU usage on macOS (when launching by double clicking executable) #7059
Open
@hacknus

Description

@hacknus

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

  1. macOS:
    cargo build --release -p egui_demo_app

  2. and then double click the executable to launch.

  3. Move with the cursor over the egui UI to trigger a redraw.

Image

Note that it does not happen when the app is in the foreground:

Image

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is brokeneframeRelates to epi and eframenative-mac

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0