From: Andrew Dolgov Date: Thu, 2 May 2013 06:09:01 +0000 (+0400) Subject: make tag cache processing faster in cdm X-Git-Tag: 1.7.9~25^2~21 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f8a25082b39cc6ee2b0d82a42e46d4609b32ce6a;p=tt-rss.git make tag cache processing faster in cdm --- diff --git a/classes/feeds.php b/classes/feeds.php index f21bb3ce..31bcbac5 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -514,8 +514,10 @@ class Feeds extends Handler_Protected { } else { - $line["tags"] = get_article_tags($id, $_SESSION["uid"], $line["tag_cache"]); - unset($line["tag_cache"]); + if ($line["tag_cache"]) + $tags = explode(",", $line["tag_cache"]); + else + $tags = false; $line["content"] = sanitize($line["content_preview"], sql_bool_to_bool($line['hide_images']), false, $entry_site_url); @@ -682,7 +684,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= $p->hook_article_left_button($line); } - $tags_str = format_tags_string($line["tags"], $id); + $tags_str = format_tags_string($tags, $id); $reply['content'] .= "Tags $tags_str diff --git a/include/functions.php b/include/functions.php index c39b4938..0b8f5b0d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2902,7 +2902,6 @@ ttrss_tags WHERE post_int_id = (SELECT int_id FROM ttrss_user_entries WHERE ref_id = '$a_id' AND owner_uid = '$owner_uid' LIMIT 1) ORDER BY tag_name"; - $obj_id = md5("TAGS:$owner_uid:$id"); $tags = array(); /* check cache first */ @@ -3249,7 +3248,7 @@ function print_checkpoint($n, $s) { $ts = microtime(true); - echo sprintf("", $ts - $s); + echo sprintf("\n", $ts - $s); return $ts; }