From 56d15bb003e5bfa3033692697faee2d275473e5a Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Tue, 8 Jul 2008 21:24:59 -0700 Subject: [PATCH] sync every 5 minutes (up from 1); start the score threshold at 75 (down from 100); decrement threshold by 25 each iteration (up from 5). these changes guarantee even small changes will sync in no more than 15 minutes (down from 20) --- services/sync/modules/service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index ea87356b83b3..bc9b8bb8cc5c 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -53,16 +53,16 @@ const Cu = Components.utils; // we'll sync it, reset its threshold to the initial value, rinse, and repeat. // How long we wait between sync checks. -const SCHEDULED_SYNC_INTERVAL = 60 * 1000; // one minute +const SCHEDULED_SYNC_INTERVAL = 60 * 1000 * 5; // five minutes // INITIAL_THRESHOLD represents the value an engine's score has to exceed // in order for us to sync it the first time we start up (and the first time // we do a sync check after having synced the engine or reset the threshold). -const INITIAL_THRESHOLD = 100; +const INITIAL_THRESHOLD = 75; // THRESHOLD_DECREMENT_STEP is the amount by which we decrement an engine's // threshold each time we do a sync check and don't sync that engine. -const THRESHOLD_DECREMENT_STEP = 5; +const THRESHOLD_DECREMENT_STEP = 25; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://weave/log4moz.js");