Actions
Bug #8931
closedDiRT tools group directory is causing large number of uncached database queries
Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
DiRT Integration
Target version:
Start date:
2017-11-22
Due date:
% Done:
0%
Estimated time:
Deployment actions:
Description
Here's a snippet:
[REQUEST_URI] => /groups/cunydhi/dirt/ [51] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00030207633972168 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [52] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_8960') [1] => 0.00040197372436523 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [53] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00031709671020508 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [54] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_1791') [1] => 0.00035595893859863 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [55] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00032210350036621 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [56] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_6676') [1] => 0.0003669261932373 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [57] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00033903121948242 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [58] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_1192') [1] => 0.00084996223449707 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [59] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00033211708068848 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [60] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_8308') [1] => 0.00033307075500488 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [61] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00030803680419922 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [62] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_831') [1] => 0.00034189224243164 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [63] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.00034308433532715 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [64] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_3934') [1] => 0.0003199577331543 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query ) [65] => Array ( [0] => SELECT wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND ( 0 = 1 ) AND wp_1_posts.post_type = 'ddc_tool' AND ((wp_1_posts.post_status = 'publish')) GROUP BY wp_1_posts.ID ORDER BY wp_1_posts.post_name ASC [1] => 0.0003349781036377 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts ) [66] => Array ( [0] => SELECT wp_1_term_taxonomy.term_taxonomy_id FROM wp_1_term_taxonomy INNER JOIN wp_1_terms USING (term_id) WHERE taxonomy = 'ddc_tool_is_used_by_user' AND wp_1_terms.slug IN ('ddc_tool_is_used_by_user_613') [1] => 0.00033998489379883 [2] => require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do_action('bp_screens'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->_display_hook, bp_core_load_template, load_template, require_once('/themes/bp-nelo/groups/single/plugins.php'), do_action('bp_template_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Group_Extension->call_display, DDC_Group_Extension->display, bp_get_template_part, bp_locate_template, load_template, require('/plugins/dirt-directory-client/templates/dirt/group.php'), ddc_get_tools_used_by_group, ddc_get_tools_of_user, ddc_get_tools, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, WP_Tax_Query->get_sql, WP_Tax_Query->get_sql_clauses, WP_Tax_Query->get_sql_for_query, WP_Tax_Query->get_sql_for_clause, WP_Tax_Query->clean_query, WP_Tax_Query->transform_query )
Some of these taxonomy checks could possibly be grouped together, and some could be more aggressively cached.
Actions