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

Added caching to the proxy part of the BlueZManager class #15

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

gvheertum
Copy link

As stated in Issue #6 excessive calling of the GetProxiesAsync will hang up sometimes. I pinpointed the issue to the calls to the GetManagedObjects on the dbus. The manual of dbus states that this is a hefty call and should not be done very often.

I changed to code to do an initials scan and subscribe to the add/remove events and update the cache at the moment an event is raised. This improved the overall performance of the GetProxiesAsync and causes the code to no longer hang on the GetManagedObjects. In duration tests we've seen no issues with missed add/remove events what so ever.

@vestervang
Copy link

@gvheertum Hi, i just created a fork of this repo. If you make a PR I'll merge it. The URL is https://github.com/vestervang/DotNet-BlueZ

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