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
Use loop.time in DataUpdateCoordinator #98937
Conversation
Looks promising. Are there other questions? |
ee20b40
to
542a6cf
Compare
542a6cf
to
2109e73
Compare
abc33a8
to
c941cff
Compare
Looks like its close to passing. Happy to put this on all my production for live testing when its ready for final review |
Pushing on to my houston production now.. Will report back in the morning |
Profile looks good, manual testing looks good. Will report back tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested overnight. All good
Looks like this is good to go once tests are sorted
@bdraco tests pass now, do you think it's OK to merge it? |
Yes. Been running on multiple production for a while now with no issues |
Thanks @emontnemery |
I'm pondering if this could be the background to: #100221 |
Proposed change
Use
loop.time
inDataUpdateCoordinator
Rationale: Calls to
utcnow()
are expensive on some platforms. TheDataUpdateCoordinator
does not need to sleep until a precise wall clock time, so we can useloop.time()
insteadType of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: