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

USBCECAdapterDetection: Limit scan to tty subsystem #494

Closed
wants to merge 1 commit into from

Conversation

fritsch
Copy link
Contributor

@fritsch fritsch commented Mar 15, 2020

While debugging high CPU load coming from PeripUSBCEC thread I figured that the library call: DetectAdapters hoggs the CPU for up to 200 ms per Call. Looking into it I spotted that the usb udev enumeration and scanning happens on every device in /sys

Therefore: Limit device comparison for the tty subsystem only. This reduces comparisons by factor 4. 100 tty-devices vs. 400 devices in sum. It's a pitty that we need to start with the leafs and then query over the parent.

Runtime tested on LibreELEC.

@fritsch fritsch changed the title USBCECAdapterDetection: Limit scan to USB subsystem USBCECAdapterDetection: Limit scan to vendorId Mar 16, 2020
@fritsch fritsch closed this Mar 16, 2020
@fritsch fritsch changed the title USBCECAdapterDetection: Limit scan to vendorId USBCECAdapterDetection: Limit scan to tty subsystem Mar 16, 2020
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 this pull request may close these issues.

1 participant