cutie
cutie copied to clipboard
Waiting for input on Windows uses high CPU
When using a simple cutie.select
on Windows, a CPU core will be pegged to 80~90% while waiting for input due to readchar
.
~I tried switching to using this method with msvcrt.getch()
and it seemed to use near 2% CPU usage while waiting for character input for comparison.~
(In the screenshot the CPU has hyperthreading so even though 2 are pegged it's just a single core.)
Edit: I am going to open an issue on readchar
, because it's a really easy fix of a while loop gone astray. https://github.com/magmax/python-readchar/issues/42