[wp-trac] [WordPress Trac] #59532: Avoid registering block-patterns on the frontend
WordPress Trac
noreply at wordpress.org
Thu Jan 25 07:07:47 UTC 2024
#59532: Avoid registering block-patterns on the frontend
--------------------------+--------------------------
Reporter: aristath | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: Editor | Version: 6.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
--------------------------+--------------------------
Comment (by thekt12):
I have worked on @spacedmonkey POV and improved upon the code to fix some
BC issues.
New PR is good for review https://github.com/WordPress/wordpress-
develop/pull/5941
Performance benchmarking shows a small by consistent improvement for TT4
theme. However, little to no change was observed for TT3. (check PR for
metrics)
I also do see an opportunity to improve performance further by persistent
caching `WP_Block_Patterns_Registry::prepare_content()`
These are referred to in both
`WP_Block_Patterns_Registry::get_all_registered` and
`WP_Block_Patterns_Registry::get_registered`.
**Next step:**
* Use the profiler to check overhead on
`WP_Block_Patterns_Registry::prepare_content()` which seems to have some
expensive operations like block parsing.
* Add unit test
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59532#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list