waste fewer resources while a user only has one client active

RESOLVED FIXED in 0.7

Status

Cloud Services
Firefox Sync: Backend
P1
normal
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mconnor, Assigned: mconnor)

Tracking

unspecified
Points:
---
Bug Flags:
blocking-weave1.0 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

8 years ago
Created attachment 401553 [details] [diff] [review]
force timers to 24 hours with a single client set up.

POC patch attached, default to 24 hours between syncs for users with a single client.

With this we'll sync after each startup, and then either manually or every 24 hours after that.  Manual syncs will bump the next sync to 24 hours out from then.

To do/consider:

* Store next sync time as a pref, enforce 24 hours or manual syncs across restarts.
* Look at tracker-based sync calls to determine.
* Disable tab sync with a single client active.
Flags: blocking-weave1.0+
(Assignee)

Comment 1

8 years ago
Created attachment 401788 [details] [diff] [review]
patch

What this does:

* default sync interval for single-client users is 24 hours.  Manual syncs are allowed in this case.
* scheduling works across sessions for all users (this helps with backoff too)
* We only sync on startup if we're past the next scheduled sync time.
* Tabs are not synced when there is a single client active.
Attachment #401553 - Attachment is obsolete: true
Attachment #401788 - Flags: review?(thunder)
(Assignee)

Comment 2

8 years ago
Created attachment 402533 [details] [diff] [review]
take this further

This patch is on top of bug 518075, and there's a bit of cleanup for that yet.

This moves the consts to constants.js, and defines thresholds and intervals for different client modes.  Basically, single-client should remain unchanged, but multi-client without mobile clients will have.
Attachment #401788 - Attachment is obsolete: true
Attachment #401788 - Flags: review?(thunder)

Updated

8 years ago
Depends on: 518075

Updated

8 years ago
Depends on: 518864

Comment 3

8 years ago
http://hg.mozilla.org/labs/weave/rev/98757a88f66c
Adjust how often Weave syncs based on the number of clients and only sync tabs if there are multiple clients.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
No longer depends on: 518075
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.