Skip to content

Update PhoneAPI.cpp to reduce chattiness#10367

Merged
thebentern merged 1 commit into
masterfrom
PhoneAPI.cpp_reduce_chattiness
May 1, 2026
Merged

Update PhoneAPI.cpp to reduce chattiness#10367
thebentern merged 1 commit into
masterfrom
PhoneAPI.cpp_reduce_chattiness

Conversation

@Xaositek

@Xaositek Xaositek commented May 1, 2026

Copy link
Copy Markdown
Contributor

Update PhoneAPI.cpp to reduce chattiness, this fixes an excessive number of "INFO | 21:01:05 13 BLE notify fromNum" lines and improves initial connection by roughly 2.5 seconds.

Before:
DEBUG | 21:01:05 13 Send My NodeInfo
INFO | 21:01:05 13 BLE notify fromNum
...
INFO | 21:01:06 14 BLE notify fromNum
DEBUG | 21:01:06 14 nodeinfo: 20/80
INFO | 21:01:06 14 BLE notify fromNum
...
INFO | 21:01:07 15 BLE notify fromNum
DEBUG | 21:01:07 15 nodeinfo: 40/80
INFO | 21:01:07 15 BLE notify fromNum
...INFO | 21:01:09 17 BLE notify fromNum
DEBUG | 21:01:09 17 nodeinfo: 60/80
INFO | 21:01:09 17 BLE notify fromNum
...
INFO | 21:01:10 18 BLE notify fromNum
DEBUG | 21:01:10 18 nodeinfo: 80/80
DEBUG | 21:01:10 18 nodeinfo: 80/80
DEBUG | 21:01:10 18 nodeinfo: 80/80
DEBUG | 21:01:10 18 nodeinfo: 80/80
DEBUG | 21:01:10 18 Done sending 80 of 80 nodeinfos millis=18884

After:
DEBUG | 21:10:09 11 Send My NodeInfo
INFO | 21:10:09 11 BLE notify fromNum
DEBUG | 21:10:09 11 nodeinfo: 2/80
INFO | 21:10:09 11 BLE notify fromNum
DEBUG | 21:10:10 12 nodeinfo: 20/80
DEBUG | 21:10:11 13 nodeinfo: 40/80
DEBUG | 21:10:12 14 nodeinfo: 60/80
DEBUG | 21:10:13 15 nodeinfo: 80/80
DEBUG | 21:10:14 16 Done sending 80 of 80 nodeinfos millis=16307

@Xaositek Xaositek self-assigned this May 1, 2026
@Xaositek Xaositek added the cleanup Code cleanup or refactor label May 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces BLE “fromNum” notify spam during the initial config/node database sync by avoiding redundant onNowHasData() triggers while streaming NodeInfo records, improving connection/setup latency.

Changes:

  • Move NodeInfo progress logging from the send path to the fetch/prefetch path so each progress value logs only once.
  • Only call onNowHasData(0) from prefetchNodeInfos() when the NodeInfo queue transitions from empty → non-empty, reducing BLE notify churn during initial sync.

@thebentern thebentern merged commit 90744ee into master May 1, 2026
87 checks passed
@Xaositek Xaositek deleted the PhoneAPI.cpp_reduce_chattiness branch May 21, 2026 12:42
Evil8it pushed a commit to Evil8it/ME4TACTNK that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code cleanup or refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants