-
Notifications
You must be signed in to change notification settings - Fork 397
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
connection-callback branch cpu usage is very high #567
Comments
Let me describe it more clearly, when I don't plug in the device (0x0213, 0xA22C), the CPU usage is not high, but when I plug in the device, the CPU instantly rises to 9%~11% |
Please provide more details about the device (eg: output from hidtest) and host PC configuration and OS you are using. |
And the source for your Can you confirm that you're trying out the https://github.com/libusb/hidapi/tree/connection-callback branch on Windows? I don't think anything abnormal is happening. And BTW: what is the CPU usage when you plug your device, when your application isn't running at all? |
On my end I only have 0.05% cpu usage when a device gets connected with the connection-callback branch and my application does a number of things at the same time. My config is Windows 11 and a 13600k cpu. Make sure you keep your code in the callback as concise as possible. You can use a producer-consumer pattern with a FIFO to process those connections/disconnections in another thread. |
Any updates? Thanks. We will close the issue if there are no responses. |
pls check it!
The text was updated successfully, but these errors were encountered: