Automattic / Automattic/edit-flow
Scalability: Prevent EF from loading every author all at once
- Dominant language
- PHP
- Stars
- 366
- Forks
- 137
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 6
Description
Extracting an issue that arose in https://github.com/Automattic/Edit-Flow/issues/265
There are two places where Edit Flow will load every author+ (editor & admins included) all at once, which could present scaling issue on a site with a very large amount of users with author capabilities.
As a side note - It's worth noting that WP core will also load every author+ for the core author metabox. This ends up being one giant select field. I'm thinking there could possibly be some value here for EF to perhaps unset the core metabox and register it's own, perhaps using part of the solution used to solve this issue.
The two places where EF currently loads all users are:
1. On every post/page's notifications meta box:

2. When editing a group:

From @sboisvert:
> I could see a hybrid model where we show all authors if the count is less then X where X is filterable with a default of let's say 20 [totally arbitrary number] and then if you want more you need to search. Maybe in the UI we'd put a note at the bottom of the list that mentions that you need to search to get more results. This should allow us to have the inline disabled button. That being said, I might be overthinking it and Ajax is the way to go.
I'm also thinking it will be important that all currently subscribed/selected users are always loaded and shown at the top. As a part of implementing this, the `All` and `Selected` filter logic and UI could likely be done away with.
Contributor guide
Research direction
Start by locating the notification meta box on post and page editing screens and the user-selection UI when editing a group. Review how both places currently load authors, then compare the proposed hybrid threshold, AJAX search, and selected-user behavior; completion criteria are not settled in the issue. Also review the related issue 265 and the WordPress core author metabox context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100