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

intermittently very high CPU load on YubiGuard.py #13

Closed
mozfreddyb opened this issue Sep 11, 2017 · 5 comments
Closed

intermittently very high CPU load on YubiGuard.py #13

mozfreddyb opened this issue Sep 11, 2017 · 5 comments

Comments

@mozfreddyb
Copy link
Contributor

I sometimes observe very high CPU load on the python script, but have no way so far to debug or reproduce. I'll consider this issue an "early warning" and will fill in with more information as it becomes available.

@bfelder, can you give me any suggestions what I can do to turn this issue into something more actionable?

@pykong
Copy link
Owner

pykong commented Sep 11, 2017

@mozfreddyb You are correct. Actually, it has to do with the constant polling of the xinput.
You may reduce the cycle time to lessen CPU load. (I already did but for some machines, this may not be enough.)

Maybe there is a much better way to go about the whole program logic which does not task the CPU that much. But right now I do not know any better.

@mozfreddyb
Copy link
Contributor Author

cycle time? This is the time.sleep(0.1) in line 168, I suppose?

@pykong
Copy link
Owner

pykong commented Sep 11, 2017

Yes. Just use 1 as an argument and see how it affects the CPU load.
Maybe you could make the value depending on settings, which would allow it to become more easily
adjusted. Perhaps even by command line argument.

@mozfreddyb
Copy link
Contributor Author

I'll give it a try, thanks!

@pykong
Copy link
Owner

pykong commented Oct 16, 2019

Closing this in favour of a more actionable isssue: #14

@pykong pykong closed this as completed Oct 16, 2019
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

No branches or pull requests

2 participants