cutie icon indicating copy to clipboard operation
cutie copied to clipboard

Waiting for input on Windows uses high CPU

Open cdgriffith opened this issue 5 years ago • 0 comments

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.) cutie_cpu

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

cdgriffith avatar Mar 02 '19 20:03 cdgriffith