ConfigDB
#2895
Replies: 1 comment 1 reply
-
@pljakobs it would be great if you can write a small article explaining the advantages for non-advanced users. This article should be attached as part of the documentation of the library. And @mikee47 you rock as always :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
just a huge shoutout to @mikee47 for his work on ConfigDB. This was born out of my frustration with the json config of the project I'm working on being rather large and kept in RAM as well has having to be serialized and de-serialized multiple times.
The design of ConfigDB makes it tremendously easy to serialize configurations to send it over basically anything that can read/write a stream and at the same time use it as if it was a "normal" C++ structure - with the slight difference that it persists any value.
The option to partition a large json document into smaller subtrees allows me to find the right balance between performance and free memory.
Before ConfigDB, I regularly had about 18kB free, with ConfigDB, this went up to 28kB (now 31, I have since found another 3kB to move to FLASH). On a platform as limited as the Esp8266, that's a huge gain. This also gives me the room I need to implement further improvements.
The best: because I could drop over 1200 lines of code that was assigning json values to a large struct and vice versa after deserialization / before serialization, the overall irom0_text usage dropped by a good amount, so not only am I using less RAM, my final code has gotten smaller, too.
I knew for a while that this is a small (by team size), but very positive and supportive project, but this was beyond any expectation.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions