Avoid doing duplicate calls to setings_load_subtree, which iterates NVS fully each time under the hood, and instead use on settings_load later in the lifecycle.
Found this during Studio work, after we ended up with many more settings entries. Pinned it down to the many calls to settings_load_subtree which under the hood was actually loading the full NVS data each time, doing a ton of duplicate work. This refactor moves away from duplicate subtree loads. Doing so requires a bit of care to make timing work and have the right things loaded when needed, especially for BT initialization.
Found this during Studio work, after we ended up with many more settings entries. Pinned it down to the many calls to
settings_load_subtree
which under the hood was actually loading the full NVS data each time, doing a ton of duplicate work. This refactor moves away from duplicate subtree loads. Doing so requires a bit of care to make timing work and have the right things loaded when needed, especially for BT initialization.