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

Optimize idle timer and legacy device polling #7574

Merged
merged 1 commit into from Feb 5, 2024

Conversation

manup
Copy link
Member

@manup manup commented Feb 4, 2024

This part of the code is a mess and grown over time.

The PR tries to:

  • Break up looping over all sensors and lights by only processing up to 5 from each per idle timer call.
  • Fetch modelid/manufacturer name from parent Device instead of looping over sibling lights and sensors.
  • Control pacing of legacy poll manager via DDF device tick to not schedule things in parallel.

Over time the legacy idle timer and poll manager code needs to go, it will take some iterations to do this and even break legacy devices in the process, which needs to be converted to DDF.

This part of the code is a mess and grown over time.

The PR tries to:

- Break up looping over all sensors and lights by only processing up to 5 from each per idle timer call.
- Fetch modelid/manufacturer name from parent Device instead of looping over sibling lights and sensors.
- Control pacing of legacy poll manager via DDF device tick to not schedule things in parallel.

Over time the legacy idle timer and poll manager code needs to go, it will take some iterations to do this and even break legacy devices in the process, which needs to be converted to DDF.
@manup manup added this to the v2.25.2 milestone Feb 4, 2024
@manup manup merged commit e5ae69d into dresden-elektronik:master Feb 5, 2024
@manup manup deleted the idle_poll branch February 5, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant