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

fix: calculate assumed state only once #803

Merged
merged 1 commit into from
Dec 24, 2023
Merged

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Dec 23, 2023

assumed_state on the entities was calculated for each entity. We can calculate it once per update instead.

@bdraco bdraco changed the title Only calculate assumed state once refactor: only calculate assumed state once Dec 23, 2023
@alandtse
Copy link
Owner

Sounds like this may be a perf: since it could improve performance.

@bdraco bdraco changed the title refactor: only calculate assumed state once perf: only calculate assumed state once Dec 23, 2023
@bdraco bdraco marked this pull request as ready for review December 23, 2023 22:24
assumed_state on the entities was calculated for each entity
which meant we had to do it 1000s of times per minute when
there were a lot of vins.
@alandtse alandtse changed the title perf: only calculate assumed state once fix: calculate assumed state only once Dec 24, 2023
@alandtse alandtse merged commit afaf8e7 into alandtse:dev Dec 24, 2023
5 checks passed
@bdraco bdraco deleted the assumed_state branch December 24, 2023 06:21
@bdraco
Copy link
Contributor Author

bdraco commented Dec 24, 2023

Thanks

Side note: 2023.1.x should reduce the cost of the frequent state writes from polling by ~50% plus another 14-17% from this change

@alandtse
Copy link
Owner

Thanks for the contrib. My biggest concern is we may lose all api access in a few days.

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