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: Only scan tty #495

Closed
wants to merge 1 commit into from

Conversation

fritsch
Copy link
Contributor

@fritsch fritsch commented Mar 16, 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.

This is a tested update of #494

@opdenkamp
Copy link
Contributor

I'm merging this PR in along with some other PRs in a few.
Thanks!

@opdenkamp opdenkamp closed this in d208d0e Mar 28, 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.

2 participants