• Not spent long testing 4.1-RC1 yet, looks like something might be wrong with the tagcloud widget when categories are set.

    Tested (localhost) with the theme I develop and TwentyFifteen (same result for both) and when adding a Tagcloud widget setting it to show categories the number of SQL queries increases by around 200 queries!

    I’m using https://wordpress.org/plugins/blackbox-debug-bar/ (no other plugins active) for showing SQL queries etc… get a significant increase in this type of entry:

    0.0000 [ms] 	
    
    SELECT t.*, tt.* FROM wp4_terms AS t INNER JOIN wp4_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'category' AND t.term_id = 208
    LIMIT 1;
    
    0.0000 [ms] 	
    
    SELECT t.*, tt.* FROM wp4_terms AS t INNER JOIN wp4_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'category' AND t.term_id = 254
    LIMIT 1;

    My test localhost install has 311 categories, but most are empty, the tagcloud widget shows just under 50 categories.

    Homepage using TwentyFifteen with just the Tagcloud widget with categories selected generates 229 queries (38 milliseconds). Deleting the widget generates 29 queries (15 milliseconds).

    Going to a random post with no comments. 231 queries (42 ms) with widget. 16 queries (11 ms) without widget.

    As above, but using the categories widget instead.

    Homepage categories widget generates 55 queries (21 milliseconds). Deleting the widget generates 29 queries (15 milliseconds).

    I’ve been using the tagcloud widget with categories selected in this localhost test install for WordPress 4.0.1 with nothing like this number of SQL queries (tend to be well under 50 queries) : just copied the RC1 files over 4.0.1 files and ran the database update with no problems, so been using this test setup for a while before updating to RC1.

    David

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Tagcloud Widget Categories = Significant SQL Query Increase’ is closed to new replies.