Bug 644424 - Reduce the remote tabs refresh delay and add a pref for it [r=mbrubeck]
authorVivien Nicolas <21@vingtetun.org>
Fri, 25 Mar 2011 18:41:44 +0100
changeset 67544 87c89078bc91a76d615aa4a5ded1eaa75b52c130
parent 67543 1f80214e3055a59740e68da2cffddcb8419da7e1
child 67545 78e3c2a604fbe103e64ea973521050112bc1af5a
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs644424
Bug 644424 - Reduce the remote tabs refresh delay and add a pref for it [r=mbrubeck]
mobile/app/mobile.js
mobile/chrome/content/bindings.xml
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -126,16 +126,19 @@ pref("network.autodial-helper.enabled", 
 
 // See bug 545869 for details on why these are set the way they are
 pref("network.buffer.cache.count", 24);
 pref("network.buffer.cache.size",  16384);
 
 /* history max results display */
 pref("browser.display.history.maxresults", 100);
 
+/* How many times should have passed before the remote tabs list is refreshed */
+pref("browser.display.remotetabs.timeout", 10);
+
 /* session history */
 pref("browser.sessionhistory.max_total_viewers", 1);
 pref("browser.sessionhistory.max_entries", 50);
 pref("browser.sessionhistory.optimize_eviction", true);
 
 /* session store */
 pref("browser.sessionstore.resume_session_once", false);
 pref("browser.sessionstore.resume_from_crash", true);
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -1379,17 +1379,17 @@
           // Don't do anything if the tabs engine isn't ready
           let engine = Weave.Engines.get("tabs");
           if (!engine)
             return [];
 
           // Don't bother refetching tabs if we already did so recently
           let lastFetch = Weave.Svc.Prefs.get("lastTabFetch", 0);
           let now = Math.floor(Date.now() / 1000);
-          if (now - lastFetch >= 30) {
+          if (now - lastFetch >= Services.prefs.getIntPref("browser.display.remotabs.timeout")) {
             // Force a sync only for the tabs engine
             engine.lastModified = null;
             engine.sync();
             Weave.Svc.Prefs.set("lastTabFetch", now);
           };
 
           // Generate the list of tabs
           let tabs = [];