Update PhoneAPI.cpp to reduce chattiness#10367
Merged
Merged
Conversation
thebentern
approved these changes
May 1, 2026
Contributor
There was a problem hiding this comment.
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)fromprefetchNodeInfos()when the NodeInfo queue transitions from empty → non-empty, reducing BLE notify churn during initial sync.
jp-bennett
pushed a commit
that referenced
this pull request
May 4, 2026
Evil8it
pushed a commit
to Evil8it/ME4TACTNK
that referenced
this pull request
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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