From 3c204a8e2374404d64493e91880af6d876935c2f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 Jan 2009 16:14:00 +0100 Subject: [PATCH] rate limit counters calculation in view to once per 10 sec --- backend.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend.php b/backend.php index f47ba00a..6bdeaa71 100644 --- a/backend.php +++ b/backend.php @@ -238,12 +238,14 @@ } } - // if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) { + + if (time() - $_SESSION["view:counters_stamp"] > 10) { print ""; getAllCounters($link, $omode); print ""; -// } + $_SESSION["view:counters_stamp"] = time(); + } print ""; break; // view -- 2.39.5