-
Notifications
You must be signed in to change notification settings - Fork 281
feat: adjust background sync on user activity #11149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
95d2bca
to
ce40db2
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From when we discussed the feature I remember saying that we want to track when a user accesses Mail. If they access it frequently we keep the hourly sync. If they don't, we drop down to one sync in four hours or even less often.
The current change tries to detect user activity, then skips syncing but also drops the interval from 60 minutes to 15 minutes.
Can you explain why the implementation was done so different to what we discussed? Are there new findings that make the original idea impossible?
Yes, that is what I am trying to do with this. The idea here is that the background sync will not run as long as there is a up to date heart beat. So as long as the mail UI has been active the background sync will not run, but will revert back to the regular configured interval when there is no activity. Essentially if you are active all day the background sync should not execute. And if you are not active often then it will revert to the default once an hour to sync the mailbox to reduce UI waiting time, and to pick things like iMip. It only reschdules to 15min when there is a heart beat to check for another heart beat, as the sync can be configure to run every 5min (app.mail.background-sync-interval), I thought it was more sane to check less frequently. We can probably change this to 30min. |
The cron sync will sync all INBOXes and mailboxes marked for background sync. Frontend will sync INBOXes and the currently open mailbox. Therefore, the background sync should also run when a user has the app open all day. |
This comment was marked as resolved.
This comment was marked as resolved.
20b4009
to
a8c0dcd
Compare
I discussed this PR with Sebastian and we derived a new logic. Please check the description for more information. |
Signed-off-by: SebastianKrupinski <[email protected]> Signed-off-by: Richard Steinmetz <[email protected]>
db047a3
to
febaba1
Compare
Resolves #10717
Summary
Activity level -> Sync interval