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

Create "idle" function that polls for controllers (to see if CPU usage can be reduced even more) #2

Open
mrsilver76 opened this issue Nov 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mrsilver76
Copy link
Owner

The current code uses very little CPU usage - according to Process Monitor, on my Intel N100 CPU it spends the majority of the time at 0% with brief moments at 0.5% and 1.5%.

It might be possible to reduce it even more by creating an "idle" function that loops and polls for connected controllers every (say) 2 seconds. Once a controller has been connected, the standard loop runs. In the standard loop, every (say) 15 minutes there is a check to see if the controllers are still connected. If they are not then the code returns to the "idle" function.

The idea being that if you have no controllers connected, then we can reduce the polling significantly. However there is a big risk that this doesn't lower the CPU usage very much (or potentially makes it worse) and the effort to implement outweighs the value.

@mrsilver76 mrsilver76 added the enhancement New feature or request label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant