Skip to content
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

Very high CPU usage on mouse movement #2616

Open
4 tasks done
vladh opened this issue Sep 29, 2024 · 0 comments
Open
4 tasks done

Very high CPU usage on mouse movement #2616

vladh opened this issue Sep 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vladh
Copy link
Contributor

vladh commented Sep 29, 2024

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

I'm seeing very high CPU usage (10–25%) and long render times (4–6ms) when moving my mouse. This might not be related to the mouse specifically, but it might appear when any events happen. The layout stage is also taking longer than I would expect.

This happens both in debug and release mode, both on Wayland and X11. In debug mode, render times are around 5x longer, which might be expected. I'm running sway 1.9 with the radv driver.

I've done some testing with RenderDoc but it does not seem to be a GPU-bound issue, since RenderDoc is showing GPU times of 0.0005ms per frame.

I do not have this problem with wgpu/examples/src/hello_triangle, or with winit/examples/window.rs.

Very happy to help debugging this further, but ideas would be appreciated.

Potentially related to #2477 and #2459, but unclear.

Not related to #2558.

In iced/examples/tour:

Profile: https://share.firefox.dev/4gCBgt8

iced-wayland-tour-example-htop

iced-wayland-tour-example-debug

2024-09-29-23-30-53

In iced/examples/geometry:

Profile: https://share.firefox.dev/3ZM1V0C

iced-wayland-geometry-example-htop

iced-wayland-geometry-example-debug

2024-09-29-23-33-49

What is the expected behavior?

I expect < 1% CPU usage, and < 2–3ms render times for simple examples.

Version

master

Operating System

Linux

Do you have any log output?

No response

@vladh vladh added the bug Something isn't working label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant