[wp-trac] [WordPress Trac] #57077: Performance issues in `_add_block_template_info`
WordPress Trac
noreply at wordpress.org
Thu Feb 2 23:50:58 UTC 2023
#57077: Performance issues in `_add_block_template_info`
--------------------------+--------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.1.2
Component: Themes | Version: 5.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
--------------------------+--------------------------
Comment (by flixos90):
Retroactively, an additional quick performance benchmark for this change,
using https://gist.github.com/felixarntz/de5c697a1a16c2b892634b70216eb6c7:
**With Twenty Twenty-Three home page:**
* `_add_block_template_info()`: 0.37ms compared to 3.55ms (90.6% faster)
* `_add_block_template_part_area_info()`: 3.94ms compared to 4.46ms (11.7%
faster)
* Total WP load time: 197.83ms compared to 203.07ms (2.6% faster)
**With Twenty Twenty-Three single post with Gutenberg demo content:**
* `_add_block_template_info()`: 0.18ms compared to 1.78ms (89.9% faster)
* `_add_block_template_part_area_info()`: 3.87ms compared to 4.45ms (13.0%
faster)
* Total WP load time: 191.75ms compared to 198.65ms (3.5% faster)
All data based on median server timings from 20 requests each. This is a
very nice little win through a simple change!
It also shows that `_add_block_template_part_area_info()` overall is still
pretty slow; maybe we can see if that can be improved further in another
ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57077#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list