REST: excessive authors requests on sites with many authors when editing #15985
Labels
REST API Interaction
Related to REST API
[Status] Duplicate
Used to indicate that a current issue matches an existing one and can be closed
[Type] Performance
Related to performance efforts
Describe the bug
The REST API is used to request authors to support the Authors module in the Gutenberg editor.
That's problematic on sites with many thousands (or more) of authors.
Even disabling post type support for author, the REST requests still fire continually.
e.g.
wp-json/wp/v2/users?who=authors&per_page=100&_locale=user&page=42
On a site with thousands of authors, this results in hundreds of REST requests from each browser, for each currently open draft or post.
The resulting queries can cause DB performance issues.
To reproduce
wp-json/wp/v2/users?who=authors&per_page=100&_locale=user&page={n}
Expected behavior
Fewer resulting DB queries to accomplish this functionality.
Most of the time, authors will not be changed, so it seems one alternative might be to only obtain authors when actually needed.
Possible solutions:
Additional context
WordPress core 5.2.1
The text was updated successfully, but these errors were encountered: