mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 00:51:29 +00:00
getLabelCounters: skip processing when labels are disabled; misc performance tweaks
This commit is contained in:
@@ -358,7 +358,7 @@
|
||||
// }
|
||||
|
||||
if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop ||
|
||||
time() - $_SESSION["viewfeed:counters_stamp"] > 30) {
|
||||
time() - $_SESSION["viewfeed:counters_stamp"] > 60) {
|
||||
if (!$offset) {
|
||||
print "<counters>";
|
||||
getAllCounters($link, $omode, $feed);
|
||||
|
||||
@@ -2678,6 +2678,7 @@
|
||||
$ret_arr["-3"]["description"] = __("Fresh articles");
|
||||
}
|
||||
|
||||
if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
|
||||
|
||||
$result = db_query($link, "SELECT owner_uid,id,sql_exp,description FROM
|
||||
ttrss_labels WHERE owner_uid = ".$_SESSION["uid"]." ORDER by description");
|
||||
@@ -2720,6 +2721,7 @@
|
||||
|
||||
error_reporting (DEFAULT_ERROR_LEVEL);
|
||||
}
|
||||
}
|
||||
|
||||
if ($smart_mode && $lctrs_modified) {
|
||||
$_SESSION["lctr_last_value"] = $old_counters;
|
||||
|
||||
Reference in New Issue
Block a user