Identical queries of the form
SELECT parent FROM term_hierarchy WHERE tid = 8
and
SELECT vid FROM term_data WHERE tid = 8
are repeated very often (more than 50 times on some pages of my website).
side note:
The taxonomy_context_get_context call on line 451 seems to be unnecessary.
Comments
Comment #1
bjergtrold commentedI found something else.
If I uncomment the lines
$context = taxonomy_context_get_context();
if($node->nid == $context->nid){
$params["class"] = "active";
}
from taxonomy_context_show_nodes, then the count of those queries goes way down.
The css "active" class is still set, it seems to come from another module.
Comment #2
nedjoThanks for noting this problem. I've changed the module to use static variables, so the query should now only execute once per page.
Comment #3
nedjoComment #4
(not verified) commented