High CPU usage after 0.12 when leaving key pressed
Is there an existing issue for this?
- [X] I have searched the existing issues.
Is this issue related to iced?
- [X] 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
Are we talking release mode here?
I didn't clarify but yes, release mode in every case.
It seems like this may have been fixed in 0.13? Or maybe it is x86 and/or linux/windows specific?
It seems like this may have been fixed in 0.13? Or maybe it is x86 and/or linux/windows specific?
I can still reproduce it in 0.13 but not anymore in master, so I'm closing it. Thanks for the update.