WordPress.org

Making WordPress.org

Changeset 9337


Ignore:
Timestamp:
12/12/2019 09:47:05 PM (2 months ago)
Author:
johnjamesjacoby
Message:

Forums: unhook forum reply recounts when un/approving topics.

This helper was causing 504 timeouts when approving a topic, due to the use of bbp_get_public_child_count() internally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php

    r5710 r9337  
    2525        remove_action( 'bbp_approved_reply',   'bbp_update_reply_walker' );
    2626        remove_action( 'bbp_unapproved_reply', 'bbp_update_reply_walker' );
     27
     28        // Not needed, causing slowdown when approving topics (due to expensive count queries)
     29        remove_action( 'bbp_approved_topic',   'bbp_approved_unapproved_topic_update_forum_reply_count' );
     30        remove_action( 'bbp_unapproved_topic', 'bbp_approved_unapproved_topic_update_forum_reply_count' );
    2731
    2832        add_action( 'bbp_trashed_reply',       array( $this, 'update_reply_topic_meta' ) );
Note: See TracChangeset for help on using the changeset viewer.