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

High CPU usage after 0.12 when leaving key pressed #2459

Open
2 tasks done
lufte opened this issue Jun 12, 2024 · 2 comments
Open
2 tasks done

High CPU usage after 0.12 when leaving key pressed #2459

lufte opened this issue Jun 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@lufte
Copy link
Contributor

lufte commented Jun 12, 2024

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 recently noticed excessive CPU usage in my Iced application when I left a key pressed while writing in a TextInput. I tracked down the introduction of this behavior to the time I upgraded to Iced 0.12, and I was able to strip down my code to a minimal example that exhibits it. It's not related to TextInputs but maybe containers' Appearance.

The example is at https://git.sr.ht/~lufte/vimini/tree/high-cpu-bug. Edit Cargo.toml and src/main.rs to switch between 0.10 and 0.12. All you need to do is run the app and keep any key pressed. I see around 35% usage on my 4-core processor with the 0.12 version.

What is the expected behavior?

Same CPU usage as in 0.10

Version

crates.io release

Operating System

Linux

Do you have any log output?

No response

@lufte lufte added the bug Something isn't working label Jun 12, 2024
@hecrj
Copy link
Member

hecrj commented Jun 13, 2024

Are we talking release mode here?

@lufte
Copy link
Contributor Author

lufte commented Jun 13, 2024

I didn't clarify but yes, release mode in every case.

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

2 participants