WordPress.org

Ready to get started?Download WordPress

Forums

Edit Flow
[resolved] Large user list causing slow performance (8 posts)

  1. cb2112
    Member
    Posted 1 year ago #

    We currently have 315k+ subscribers on our WordPress site. There are delays in loading admin pages and post pages with the notification plugin enabled. This includes adding users to Edit Flow groups and when trying to create/change posts and pages. I'm assuming this is due to having to populate the users list from a large user base.

    How can we modify any get/list users functions to select only admins, editors, authors and contributors from the userbase and ignore any subscribers? I notice that pagination for the user lists is on a TODO list (for sites that have billions of users as noted in code).

    Any help would be greatly appreciated!

    Thanks,

    Chris

    http://wordpress.org/extend/plugins/edit-flow/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Do you have any special roles set up? The user selection form is only supposed to grab contributors and above by default (e.g. "who" => "author")

  3. cb2112
    Member
    Posted 1 year ago #

    There are no special roles set up, just the WordPress default ones nor are there any additional roles defined in EditFlow. However, there are some 300k of newsletter subscribers also stored in the user database, however these users are not assigned to any site. Perhaps we can filter on that?

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    To clarify, are the subscribers showing up in your users list, or just the contributors, authors, and editors? How many of the latter do you have?

  5. cb2112
    Member
    Posted 1 year ago #

    The subscribers (all 43,000 plus) are showing up in addition to the contributors (620), authors (112), editors (68).

    I've verified that the newsletter subscribers (not assigned to any site) are not being pulled into the list.

  6. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    With that many editors, authors and contributors, I think you're going to have performance issues regardless. Could it be that a small number of users only ever need to be subscribed to posts? If that was the case, you could limit the query to just specific user IDs.

  7. cb2112
    Member
    Posted 1 year ago #

    Daniel,

    Sorry for the long delay in getting back to you. The client had considered going in a different direction but decided this is the best plugin available. Having said that, can you provide me with a bit of assistance in modifying the query to select specific user IDs?

    Thank you.

  8. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Sure, you can use a filter like this:

    add_filter( 'ef_users_select_form_get_users_args', 'efx_users_select_form_get_users_args' );
    function efx_users_select_form_get_users_args( $args ) {
    
    	$args['include'] = array(
    			1, // User id == 1
    		);
    	return $args;
    }

    You'll want to modify the 'include' argument to contain the user IDs for the users you'd like included. Whew, that's a mouthful :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic