mirror of
https://github.com/espressif/openthread.git
synced 2026-10-03 14:27:38 +00:00
This commit updates `NetworkData::Publisher` to align the scheduled update times (`mUpdateTime`) of multiple pending entry additions or removals when they fall within the same valid delay window and are close in time (within `kMaxThresholdToCoalesce`). When an entry transitions to `kAdding` or `kRemoving`, it first selects a random update time within its allowed `[minDelay, maxDelay]` range and then uses `UpdateTimeCoalescer` to check if any other entry is already scheduled within that range and within the threshold. Aligning the update times allows multiple entry updates on the same device to be processed together and sent in a single `SVR_DATA.ntf` message to the Leader. This commit also adds the configuration option (enabled by default) `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_COALESCE_UPDATES_ENABLE` to control this feature.