Skip to content

Commit bf2cae9

Browse files
Make ClusterStateCache use less memory when not storing attribute values.
ClusterStateCache has a "no storing values" mode, but in that mode it still uses 24 bytes per attribute to store just the data size. For a typical device with a few hundred attributes, this adds up to multiple KB of RAM; across many devices it really starts to add up. Introduce a compile-time switch that lets us optimize the storage when we know we're not storing the data. This still keeps the old "enable storing data at compile time but turn it off at runtime" API, both for API compat and because it might reduce codesize for some consumers who care about that more than RAM.
1 parent 4f93a66 commit bf2cae9

File tree

2 files changed

+172
-87
lines changed

2 files changed

+172
-87
lines changed

0 commit comments

Comments
 (0)