[wp-trac] [WordPress Trac] #54844: Unnecessary database queries when a block theme isn't in use
WordPress Trac
noreply at wordpress.org
Wed Feb 9 13:21:04 UTC 2022
#54844: Unnecessary database queries when a block theme isn't in use
--------------------------+------------------------------------
Reporter: johnbillion | Owner: audrasjb
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.9.1
Component: Query | Version: 5.8
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: template, performance
--------------------------+------------------------------------
Changes (by audrasjb):
* owner: (none) => audrasjb
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"52697" 52697]:
{{{
#!CommitTicketReference repository="" revision="52697"
Query: Check if the theme supports `block-templates` before calling
`locate_block_template()` in `get_query_template()`.
This change improves performance for classic themes by removing an
unnecessary query and fixes an issue where a classic theme would show
"Empty template: Index" on the frontend when an empty
`(block-)templates/index.html` file exists.
Props johnbillion, ianatkins, Mamaduka, costdev, manfcarlo, dolphingg,
audrasjb, madeinua, kapilpaul, rafiahmedd, SergeyBiryukov.
Fixes #54844.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54844#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list