Support » Plugin: Private groups » Slow page load times

  • Resolved intercede01

    (@intercede01)


    Hi

    We have been using bbp-private-groups for a while, great plugin.

    All was well on our site with the plugin until we updated to version 3.4.5.

    After the update, we see a very slow response time when creating a new topic or replying to an existing topic in any forum. The time to post is between 45 second to 1 minute.
    When using version 3.4.4 the time to post is around 4 seconds.

    We have tried 3.4.5, 3.4.6, 3.4.7, 3.4.8 and 3.4.9. and they all have the same slow response when posting in the forums.

    Has anybody else reported this?
    What can we do to determine the cause of this?

    Thanks

Viewing 15 replies - 1 through 15 (of 39 total)
  • Plugin Author Robin W

    (@robin-w)

    Thanks for contacting me

    Can you confirm which version of bbpress you are using – thanks

    Thread Starter intercede01

    (@intercede01)

    Hi Robin

    Thank you for your reply.

    We are using bbpress Version 2.5.12

    Thanks

    Plugin Author Robin W

    (@robin-w)

    and (sorry) just to confirm that if you revert back to 3.4.4 it is fine, ie you have tested 3.4.4 recently.

    and is yours a big forum with lots and lots of topics?

    Thread Starter intercede01

    (@intercede01)

    Yes, we have reverted back to version 3.4.4 and it is fine.

    We have tested every version since (3.4.5, 3.4.6, 3.4.7, 3.4.8 and 3.4.9) and have seen the slow response times on all of them.

    It is not a big forum – around -100 topics.

    Thanks

    Plugin Author Robin W

    (@robin-w)

    ok, I’ve taken a look, and I’m struggling to see why the changes in 3.4.5 would affect topics.

    I am not having problems on my test site.

    Can I ask you to go to

    settings>bbp private groups>plugin information

    and email me the info in that tab.

    Contact me via my website contact

    http://www.rewweb.co.uk

    sorry if I put the email in here I get spammed for weeks!!

    Thread Starter intercede01

    (@intercede01)

    Hi Robin

    Thank you for looking at this.

    I have emailed you the information.

    Thanks

    Plugin Author Robin W

    (@robin-w)

    Thanks for emailing those through

    since you have a test site, are you able to change a few lines of code if I direct you to them?

    Thread Starter intercede01

    (@intercede01)

    Yes, we can make changes on the test site.

    Thanks

    Plugin Author Robin W

    (@robin-w)

    ok, I just want to confirm which function is causing the issue.

    in the latest version of the plugin, can you find the file

    wp-content/plugins/bbp-private-groups/includes/user-profile.php

    starting around line 102 you’ll find

    
    Function rpg_amend_subscriptions ($user_id){
    	//this function removes forums and topics subscrition on group changes
    	//eg on a group change, a user may have subscriptions to forums or topics which they no longer should have access to.
    	
    	//first forums
    	$bbp_subscription_forums = bbp_get_user_subscribed_forum_ids ($user_id) ;
    	foreach ($bbp_subscription_forums as $forum_id) {
    				if (!private_groups_can_user_view_post( $user_id, $forum_id)) {
    						bbp_remove_user_forum_subscription( $user_id, $forum_id ); 
    					}
    	}
    	//then topics
    	$bbp_subscription_topics = bbp_get_user_subscribed_topic_ids ($user_id) ;
    	foreach ($bbp_subscription_topics as $topic_id) {
    		$forum_id = private_groups_get_forum_id_from_post_id($topic_id ) ;
    				if (!private_groups_can_user_view_post( $user_id, $forum_id)) {
    					bbp_remove_user_topic_subscription( $user_id, $topic_id ); 
    					}
    	}
    	
    }

    can you amend this to

    Function rpg_amend_subscriptions ($user_id){
    	return	;
    }

    This will then just help me eliminate or otherwise this function

    • This reply was modified 4 years, 11 months ago by Robin W.
    Thread Starter intercede01

    (@intercede01)

    Thank you for providing this amendment.

    Results of testing

    Time taken to post a topic.

    Version 3.4.4 – average 5 seconds
    Version 3.4.9 – average 50 seconds
    Version 3.4.9+code amendment – average 20 seconds

    So, with the change to user-profile.php on Version 3.4.9 there is a noticeable improvement but it is still considerably slower than Version 3.4.4.

    Thanks

    Plugin Author Robin W

    (@robin-w)

    ok thanks that is useful info

    Let me do some more looking, but as you have a test site, could you also try 2 other things

    1. switch debugger on

    https://codex.wordpress.org/WP_DEBUG

    and see if any errors are created

    2. change code back to what it was and then turn off all other plugins except bbpress and private groups, and see if that has an effect – As I can’t replicate the issue, I’m suspecting that my plugin and another are trying to amend the same bit of bbpress and clashing. If I can find out which, I can probably fix. If speed returns to 5 seconds, then re-enable a couple at a time to find out which causes the issue.

    I’m away from today until Sunday, but I’ll come back to this on my return – if it’s affecting you, it is probably affecting others !!

    • This reply was modified 4 years, 11 months ago by Robin W.
    Thread Starter intercede01

    (@intercede01)

    Hi

    1.No errors are created by WP DEBUG.

    2. I have changed the code back to the original in Version 3.4.9 and deactivated all plugins (except bbpress and private groups).

    The time to post is on average 20 seconds.

    I then re-activated plugins to see if any were causing the further slow down.

    I was able to determine that when bbpress, private groups and ‘bbPress Notify (No-Spam)’ version 1.15.4 are activated – The time to post is between 45 second to 1 minute.

    Plugin Author Robin W

    (@robin-w)

    ok, I have that and I’ll try it on mine

    Plugin Author Robin W

    (@robin-w)

    still curious as to why yours takes 20 seconds with just bbpress and private groups 3.4.9, my test site takes under 2 seconds.

    Plugin Author Robin W

    (@robin-w)

    just added the bbPress Notify (No-Spam)’ version 1.15.4 and no change in the new topic time, still under 2 seconds.

Viewing 15 replies - 1 through 15 (of 39 total)
  • The topic ‘Slow page load times’ is closed to new replies.