[wp-trac] [WordPress Trac] #58299: Block template is located twice in `get_query_template()`
WordPress Trac
noreply at wordpress.org
Tue Jun 27 10:13:23 UTC 2023
#58299: Block template is located twice in `get_query_template()`
------------------------------+---------------------------
Reporter: dlh | Owner: spacedmonkey
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.3
Component: Themes | Version: 5.9
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: performance
------------------------------+---------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"56060" 56060]:
{{{
#!CommitTicketReference repository="" revision="56060"
Themes: Block template is located twice in `get_query_template()`.
When the function `_template_loader_filters` was ported to core from
gutenberg, it retained the filter to load block templates. However, the
function `locate_block_template` is called manually in
`get_query_template`, so this filter is not needed. Calling
`locate_block_template` twice, results in performance issue, as
`locate_block_template` is a expensive function to run, as it does
database and file lookups.
Props dlh, mukesh27, flixos90, SergeyBiryukov, bernhard-reiter,
spacedmonkey.
Fixes #58299.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58299#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list