perf: Interrupt stats ticker and throttle mvds on messenger.pause#7440
Merged
Conversation
033cd05 to
8426883
Compare
|
Member
Jenkins BuildsClick to see older builds (28)
|
8426883 to
b21fce9
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/10.34.x #7440 +/- ##
==================================================
Coverage ? 61.31%
==================================================
Files ? 848
Lines ? 118845
Branches ? 0
==================================================
Hits ? 72869
Misses ? 38503
Partials ? 7473
Flags with carried forward coverage won't be shown. Click here to find out more.
|
b21fce9 to
f47a616
Compare
saledjenic
approved these changes
May 15, 2026
alaibe
approved these changes
May 15, 2026
d982c7b to
1b72e37
Compare
alexjba
added a commit
to status-im/status-app
that referenced
this pull request
May 15, 2026
This commit bumps status-go to include status-im/status-go#7440. As a result the message sending is paused while in the background to stop the high frequency mvds loops that will prevent Android from going into sleep. To preserve message sending while the app is in the background/killed we'll have to wake messenger briefly on the OS intent. We'll resume messenger for 60 seconds - enough to push the message through and then it will be paused again unless the app goes back to foreground. This results in less battery usage and less events piling up in the qt event loop while the app is in the background.
2 tasks
alexjba
added a commit
to status-im/status-app
that referenced
this pull request
May 15, 2026
This commit bumps status-go to include status-im/status-go#7440. As a result the message sending is paused while in the background to stop the high frequency mvds loops that will prevent Android from going into sleep. To preserve message sending while the app is in the background/killed we'll have to wake messenger briefly on the OS intent. We'll resume messenger for 60 seconds - enough to push the message through and then it will be paused again unless the app goes back to foreground. This results in less battery usage and less events piling up in the qt event loop while the app is in the background.
7cab48c to
a6d3f65
Compare
alexjba
added a commit
to status-im/status-app
that referenced
this pull request
May 18, 2026
This commit bumps status-go to include status-im/status-go#7440. As a result the message sending is paused while in the background to stop the high frequency mvds loops that will prevent Android from going into sleep. To preserve message sending while the app is in the background/killed we'll have to wake messenger briefly on the OS intent. We'll resume messenger for 60 seconds - enough to push the message through and then it will be paused again unless the app goes back to foreground. This results in less battery usage and less events piling up in the qt event loop while the app is in the background.
The messenger needs to keep only critical infrastructure while paused. This commit stops the stats retrieval while paused - not used. And throttles the mvds datasync to 5 minutes. This means that the ack is confirmed once every 5 minutes (as opposed to 300ms) while paused. Message sending is also disabled in this time frame.
a6d3f65 to
bba1855
Compare
alexjba
added a commit
to status-im/status-app
that referenced
this pull request
May 18, 2026
This commit bumps status-go to include status-im/status-go#7440. As a result the message sending is paused while in the background to stop the high frequency mvds loops that will prevent Android from going into sleep. To preserve message sending while the app is in the background/killed we'll have to wake messenger briefly on the OS intent. We'll resume messenger for 60 seconds - enough to push the message through and then it will be paused again unless the app goes back to foreground. This results in less battery usage and less events piling up in the qt event loop while the app is in the background.
alexjba
added a commit
to status-im/status-app
that referenced
this pull request
May 18, 2026
This commit bumps status-go to include status-im/status-go#7440. As a result the message sending is paused while in the background to stop the high frequency mvds loops that will prevent Android from going into sleep. To preserve message sending while the app is in the background/killed we'll have to wake messenger briefly on the OS intent. We'll resume messenger for 60 seconds - enough to push the message through and then it will be paused again unless the app goes back to foreground. This results in less battery usage and less events piling up in the qt event loop while the app is in the background.
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.
This commit aims to fix 2 issues identified on Android. While the messenger is paused we're still receiving lots of stat update events. These events will queue until the app is back into foreground and flood the app when changing state.
The second issue is with one of the mvds epoch goroutine. Every 300ms mvds will send messages and write an epoch to DB. This prevents the device from going into deep sleep and has a big impact on battery.
This commit stops the stats retrieval while paused - it's not used anyways. And throttles the mvds datasync to 5 minutes. This means that the ack is confirmed once every 5 minutes (as opposed to 300ms) while paused. Message sending is also disabled in this time frame.
status-im/status-app#20742
Status app PR status-im/status-app#20882