-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[python] update cached attributes incrementally #26774
[python] update cached attributes incrementally #26774
Conversation
PR #26774: Size comparison from c24294a to 5240c21 Increases (8 builds for esp32, nrfconnect, psoc6, telink)
Decreases (12 builds for bl602, bl702, cc32xx, efr32, psoc6, telink)
Full report (57 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
The "REPL Tests - Linux" are good now, there is an issue with "Java Tests - Linux", but I don't think it is related to this PR. |
bbb59ed
to
f194939
Compare
PR #26774: Size comparison from 41b1d61 to f194939 Increases (2 builds for esp32, psoc6)
Decreases (8 builds for bl602, bl702, cc32xx, cyw30739, efr32, psoc6)
Full report (42 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
|
PR #26774: Size comparison from 41b1d61 to bd20dcf Increases above 0.2%:
Increases (57 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, nrfconnect, psoc6, qpg, telink)
Decreases (5 builds for bl702, cc32xx, psoc6)
Full report (58 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Instead of rebuilding the cache from scratch on every report, just update the Endpoint/Cluster/Attributes which actually changed. Obviously, this is significantly faster, especially for small updates.
Co-authored-by: Marcel van der Veldt <[email protected]>
bd20dcf
to
6e6b201
Compare
PR #26774: Size comparison from 9f43988 to 6e6b201 Increases (10 builds for bl602, bl702, cyw30739, esp32, psoc6, telink)
Decreases (9 builds for cc32xx, cyw30739, efr32, esp32, telink)
Full report (58 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #26774: Size comparison from 5728039 to a1632ca Increases (12 builds for bl602, bl702, cc32xx, cyw30739, esp32, nrfconnect, psoc6, telink)
Decreases (6 builds for efr32, esp32, telink)
Full report (58 builds for bl602, bl702, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Changes look good, but I think we don't really have any tests that actually validate data in the cache. Could you add a few? |
It seems that some of the test relies on it, at least an earlier version of this PR showed "REPL Tests - Linux" issues. But a specific test for the cache itself would probably helpful to test the cache more specifically. |
Ideally, a unit test for the cache itself would be good to add. That would require you to add a bunch of logic to inject in TLV for specific objects and prove that the cache is indeed behaving the way it should be. Alternatively, you could also add a test to |
I went down this road and implemented two test cases for this (for the Attribute-View and Cluster-View). |
Instead of rebuilding the cache from scratch on every report, just update the Endpoint/Cluster/Attributes which actually changed. Obviously, this is significantly faster, especially for small updates.