Skip to content

USBCECAdapterDetection: Only scan tty#495

Closed
fritsch wants to merge 1 commit intoPulse-Eight:masterfrom
fritsch:master
Closed

USBCECAdapterDetection: Only scan tty#495
fritsch wants to merge 1 commit intoPulse-Eight:masterfrom
fritsch:master

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