#57547 closed enhancement (fixed)
Remove get_default_block_editor_settings from theme JSON resolver
Reported by: | Mamaduka | Owned by: | flixos90 |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch has-unit-tests gutenberg-merge |
Focuses: | performance | Cc: |
Description
Context:
The issue, is that the function get_default_block_editor_settings is called. This
function returns an array of data, including lots of information needed for the
editor. But in this context, json resolved is getting lots of data is that is never
used. As this method is call 200-500 times per page load, it results in all these
calls to get_option, is_rtl and get_allowed_mime_types, data is never used. This
functions have serious overhead, as all of them have filters and some even database
queries attached to them. As this function is called on the front end, this results
in 11-15% of extra page load.
Change History (10)
This ticket was mentioned in PR #3902 on WordPress/wordpress-develop by @Mamaduka.
23 months ago
#1
- Keywords has-patch has-unit-tests added
@spacedmonkey commented on PR #3902:
23 months ago
#3
@Mamaduka commented on PR #3902:
23 months ago
#4
Updated the function name and added simple unit tests.
@Mamaduka commented on PR #3902:
23 months ago
#7
Good catch. Thank you, @felixarntz!
@Mamaduka commented on PR #3902:
23 months ago
#8
Thank you, @mukeshpanchal27!
@flixos90 commented on PR #3902:
23 months ago
#10
Committed in https://core.trac.wordpress.org/changeset/55146 🎉
Trac ticket: https://core.trac.wordpress.org/ticket/57547
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/46112