From 06c88b8dc37dceb236f1c7eea795a86088fb6135 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 21 May 2008 05:19:03 +0100 Subject: [PATCH] add some piggy-backed counters to improve reliability --- backend.php | 8 ++++---- feedlist.js | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/backend.php b/backend.php index 94a63dae1..20411cc0a 100644 --- a/backend.php +++ b/backend.php @@ -210,11 +210,11 @@ } } -/* if ($mode != "prefetch_old") { + if ($mode != "prefetch_old") { print ""; getAllCounters($link, $omode); print ""; - } */ + } print ""; break; // view @@ -288,11 +288,11 @@ if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info); -/* if (time() - $_SESSION["get_all_counters_stamp"] > 300) { + if (time() - $_SESSION["get_all_counters_stamp"] > 300) { print ""; getAllCounters($link, $omode, $feed); print ""; - } */ + } if ($_GET["debug"]) $timing_info = print_checkpoint("30", $timing_info); diff --git a/feedlist.js b/feedlist.js index e3e2cda3f..4f5c8d775 100644 --- a/feedlist.js +++ b/feedlist.js @@ -503,6 +503,9 @@ function mouse_up_handler(e) { function request_counters_real() { try { + + debug("requesting counters..."); + var query = "backend.php?op=rpc&subop=getAllCounters"; if (tagsAreDisplayed()) { @@ -535,7 +538,7 @@ function request_counters() { if (timestamp - counters_last_request > 10) { debug("scheduling request of counters..."); - window.setTimeout("request_counters_real()", 100); + window.setTimeout("request_counters_real()", 1000); counters_last_request = timestamp; } else { debug("request_counters: rate limit reached: " + (timestamp - counters_last_request));