Support » Plugin: bbp style pack » Real slow

  • Resolved Airic

    (@airic)


    Hello,
    Without de plugin activated I have a page loading in around 0.50 sec with 2 duplicate queries

    SELECT wp_posts.*
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.ID IN (84616,84617)
    AND wp_posts.post_type = 'nav_menu_item'
    AND ((wp_posts.post_status = 'publish'))
    ORDER BY wp_posts.menu_order ASC	2	
    
    2 calls
    	require_once('/themes/elegant-magazine/header.php')
    1 call
    require_once('/themes/elegant-magazine/footer.php')
    1 call
    SELECT *
    FROM wp_posts
    WHERE ID = 242500
    LIMIT 1	2	
    
    2 calls
    	Advanced_Ads_Ad->load
    1 call
    Tribe__Meta__Chunker->is_supported_post_type
    1 call

    With plugin activated it is around 4.00 sec and with 21 duplicate queries…

    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84910
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84911
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84906
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84907
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84908
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84922
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84921
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84923
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84924
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84926
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84925
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84914
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84915
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84917
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84927
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84916
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84918
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84919
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.ID
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_parent = 84909
    AND wp_posts.post_type = 'forum'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'hidden'
    OR wp_posts.post_status = 'private'))
    ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
    LIMIT 0, 50	5	
    
    5 calls
    	bbp_list_forums
    1 call
    bsp_get_forum_last_active_id
    4 calls
    SELECT wp_posts.*
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.ID IN (84616,84617)
    AND wp_posts.post_type = 'nav_menu_item'
    AND ((wp_posts.post_status = 'publish'))
    ORDER BY wp_posts.menu_order ASC	2	
    
    2 calls
    	require_once('/themes/elegant-magazine/header.php')
    1 call
    require_once('/themes/elegant-magazine/footer.php')
    1 call
    SELECT *
    FROM wp_posts
    WHERE ID = 242500
    LIMIT 1	2	
    
    2 calls
    	Advanced_Ads_Ad->load
    1 call
    Tribe__Meta__Chunker->is_supported_post_type
    1 call

    Thanks for your help…

    Eric

Viewing 5 replies - 1 through 5 (of 5 total)
  • jkw217

    (@jkw217)

    Plugin Author Robin W

    (@robin-w)

    @airic release 4.2.0 will not fix this – I need to look at this code further, but it is related to a fox I put in for categories/sub forums where freshness was not counting cotrrectly – I may need to make this optional.

    Plugin Author Robin W

    (@robin-w)

    ok, these are not ‘duplicates’ but rather a fix to bbpress where it miscalculates the last topic if you mark a topic in a sub forum as spam or deleted.

    as you have many sub forums, this takes some time to work.

    I have just released 4.2.1, where I have now made this fix optional, so by default it is switched off which will suit your site.

    You can switch it in via dashboard>settings>bbp style pack>forum display item 12.

    Airic

    (@airic)

    1.25 sec and no more “duplicate”…
    Thanx a lot
    Eric

    Plugin Author Robin W

    (@robin-w)

    great – glad you are fixed

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Real slow’ is closed to new replies.