-
Notifications
You must be signed in to change notification settings - Fork 305
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
Linear searching is a performance bottleneck in BlueZManager.get_services
with many devices
#927
Labels
Backend: BlueZ
Issues and PRs relating to the BlueZ backend
Comments
I'm planning on working on a solution for this |
It looks like sometimes they are missing as well |
Might also be the cause of home-assistant/core#75962 (comment)
|
dlech
added a commit
that referenced
this issue
Aug 26, 2022
This adds maps to improve performance when calling get_services(). Previously we had to enumerate all BlueZ D-Bus objects for each service, characteristic and descriptor. When there were many devices, this was a performance bottleneck. Instead, we can create a map of the D-Bus object tree as new interfaces appear, then use this map as an efficient way to find the child D-Bus object paths in the GATT tree. Fixes #927.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Properties are indexed well for
_wait_condition
but building the services can be expensive when the number of properties stored gets to a large number. Its noticeable when there ~20 bluetooth devices that have their services resolved in the properties dictThe text was updated successfully, but these errors were encountered: