[wp-trac] [WordPress Trac] #59490: Performance issues in _register_theme_block_patterns
WordPress Trac
noreply at wordpress.org
Fri Sep 29 14:47:10 UTC 2023
#59490: Performance issues in _register_theme_block_patterns
--------------------------+--------------------------
Reporter: spacedmonkey | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Editor | Version: 6.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
--------------------------+--------------------------
Comment (by spacedmonkey):
Updated my PR with unit tests and improved code. It is ready for review.
For my PR, I run benchmarks, PHP 7.4, 1000 runs.
==== Theme 2021
|| || Trunk || PR ||
|| Response Time (median)|| 59.61 || 59.39 ||
|| wp-load-alloptions-query (median)|| 0.93 || 0.93 ||
|| wp-before-template (median)|| 23.64 || 23.46 ||
|| wp-template (median)|| 32.78 || 32.61 ||
|| wp-total (median)|| 56.46 || 56.21 ||
==== Theme 2023
|| || Trunk || PR ||
|| Response Time (median)|| 87.47 || 82.8 ||
|| wp-load-alloptions-query (median)|| 0.93 || 0.92 ||
|| wp-before-template (median)|| 39.24 || 36.03||
|| wp-template (median)|| 44.43 || 43.36 ||
|| wp-total (median)|| 83.72 || 79.39 ||
==== Theme 2024
|| || Trunk || PR ||
|| Response Time (median)|| 124.19 || 98.33 ||
|| wp-load-alloptions-query (median)|| 0.93 || 0.94 ||
|| wp-before-template (median)|| 59.31 || 36.22||
|| wp-template (median)|| 60.53 || 58.19 ||
|| wp-total (median)|| 120.44 || 94.51 ||
As you can see from these profiles, there is a net benefit for all themes
( as it save the file lookups ). But the benefit is clean for TT4 theme.
As this change has unit tests, I believe it should be considered for
commiting in WP 6.4.
CC @flixos90 @joemcgill for review.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59490#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list