[wp-trac] [WordPress Trac] #51117: Sitemap & XSL requests execute main query for home page. (was: Sitemap & XLS requests execute main query for home page.)
WordPress Trac
noreply at wordpress.org
Mon Aug 24 19:54:46 UTC 2020
#51117: Sitemap & XSL requests execute main query for home page.
---------------------------+------------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Sitemaps | Version: 5.5
Severity: normal | Resolution:
Keywords: | Focuses: performance
---------------------------+------------------------------
Description changed by SergeyBiryukov:
Old description:
> When requesting a sitemap, the main query is run with the parameters for
> the `is_home()` request by default. The same is true for the stylesheet.
>
> * On a site without posts this can return a false 404 error for the
> sitemap
> * On a site without a persistent cache, this can result in 10 unneeded
> database queries.
>
> Database log for requesting the first page of the posts sitemap is
> attached, other sitemap requests look similar up until the sitemap
> specific DB query is reached,
>
> Proposal:
>
> * Prevent main query on sitemaps
> * Move stylesheet to a hard coded xls file if possible
New description:
When requesting a sitemap, the main query is run with the parameters for
the `is_home()` request by default. The same is true for the stylesheet.
* On a site without posts this can return a false 404 error for the
sitemap
* On a site without a persistent cache, this can result in 10 unneeded
database queries.
Database log for requesting the first page of the posts sitemap is
attached, other sitemap requests look similar up until the sitemap
specific DB query is reached,
Proposal:
* Prevent main query on sitemaps
* Move stylesheet to a hard coded xsl file if possible
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51117#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list