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

Waiting for input on Windows uses high CPU #23

Open
cdgriffith opened this issue Mar 2, 2019 · 0 comments
Open

Waiting for input on Windows uses high CPU #23

cdgriffith opened this issue Mar 2, 2019 · 0 comments

Comments

@cdgriffith
Copy link

cdgriffith commented Mar 2, 2019

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. magmax/python-readchar#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant