Closed Bug 518075 Opened 15 years ago Closed 15 years ago

explore longer sync intervals + syncing based on trackers

Categories

(Firefox :: Sync, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
1.0 beta1

People

(Reporter: mconnor, Assigned: mconnor)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch WIP (obsolete) — Splinter Review
just some stuff I've been thinking about for a while, sticking it here so I don't forget (yay plane hacking)
Attached patch current (obsolete) — Splinter Review
to-do:

* figure out right threshold values
* figure out how this plays better with different user sync types
Attachment #402047 - Attachment is obsolete: true
Blocks: 517597
One potential issue is that users can sync (much) more often than the normal sync intervals. So single client mode could trigger many more than just once-a-day syncs.
No longer blocks: 517597
Attachment #402469 - Attachment is obsolete: true
The amount of records needed to get to a score of 1000 is pretty high, but the point is fair.  We can tweak the threshold values to be whatever we want, as well as adjusting the scores per-engine.  The main point is to define an amount of data that's "big enough" to justify an early sync in the various cases, given that the single user case is largely "backup" we want to make sure the delta between saved and not-saved never too high.
Flags: blocking-weave1.0+
Target Milestone: --- → 0.8
Target Milestone: 0.8 → 0.9
http://hg.mozilla.org/labs/weave/rev/53769570c48a
land this with tweaked item values.

Clearing history/passwords will force a sync based on current values, which is desired behaviour.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
9.7 +  get syncThreshold() Svc.Prefs.get("syncThreshold", SINGLE_USER_THRESHOLD),
9.8 +  set syncThreshold(value) Svc.Prefs.set("nextSync", value),
probably meant set("syncThreshold", .. ?

9.44 +  _handleScoreUpdate: function WeaveSvc__handleScoreUpdate() {
9.45 +    const SCORE_UPDATE_DELAY = 3000;
9.46 +    if (this._scoreTimer) {
9.47 +      this._scoreTimer.delay = SCORE_UPDATE_DELAY;
9.48 +      return;
9.49 +    }
9.50 +    else {
9.51 +      Utils.delay(function() this._doGS(), SCORE_UPDATE_DELAY, this, "_scoreTimer");
9.52 +    }
9.53 +  },
I believe the first if block is unnecessary as delay() will basically do timer.delay = DELAY. Just checking you weren't trying to do something different?
Oh, I didn't look into the internals of Utils.delay(), I just wanted to make it work since the old patch bitrotted.  We can certainly change that now. :)
http://hg.mozilla.org/labs/weave/rev/a8a4fe9267ae
fix this, and fix globalScore growing too fast...
Blocks: 530863
Blocks: 531943
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: