[wp-trac] [WordPress Trac] #56815: Massive (potential) performance issues within get_default_block_editor_settings
WordPress Trac
noreply at wordpress.org
Wed Nov 9 01:07:01 UTC 2022
#56815: Massive (potential) performance issues within
get_default_block_editor_settings
---------------------------------------------+-----------------------------
Reporter: janthiel | Owner: flixos90
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1.1
Component: Editor | Version: 6.0
Severity: major | Resolution: fixed
Keywords: has-patch commit has-unit-tests | Focuses: multisite,
| performance
---------------------------------------------+-----------------------------
Changes (by flixos90):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"54772" 54772]:
{{{
#!CommitTicketReference repository="" revision="54772"
Editor: Improve frontend performance for
`get_default_block_editor_settings()`.
The `wp_max_upload_size()` function can be expensive to call, especially
for large sites or multisites. For the frontend usage of
`get_default_block_editor_settings()` knowing the allowed upload size is
typically unnecessary.
This changeset adds a condition so that `wp_max_upload_size()` is only
called if the current user can actually `upload_files`. It keeps the data
present when it is actually needed while avoiding the execution overhead
when it is not needed.
Props janthiel, Clorith, flixos90, spacedmonkey.
Merges [54769] to the 6.1 branch.
Fixes #56815.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56815#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list