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

avoid too frequent SmartShunt data copies #596

Merged

Conversation

schlimmchen
Copy link
Member

currently the whole SmartShunt data structure is copied to the BatteryStats instance in every loop, even though the data cannot possibly have changed. this is quite an expensive task to do in every loop. this change tracks the last update timestamp and only does the copy operation if an actual updated data structure was received from the smart shunt.

currently the whole SmartShunt data structure is copied to the
BatteryStats instance in every loop, even though the data cannot
possibly have changed. this is quite an expensive task to do in every
loop. this change tracks the last update timestamp and only does the
copy operation if an actual updated data structure was received from
the smart shunt.
@helgeerbe helgeerbe merged commit a012d81 into hoylabs:development Jan 7, 2024
4 of 8 checks passed
@schlimmchen schlimmchen deleted the less-copying-for-smartshunt branch February 4, 2024 13:46
Copy link

github-actions bot commented Apr 4, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants