[wp-trac] [WordPress Trac] #51117: Sitemap & XLS requests execute main query for home page.

WordPress Trac noreply at wordpress.org
Mon Aug 24 06:09:50 UTC 2020


#51117: Sitemap & XLS 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         |   Keywords:
  Focuses:  performance    |
---------------------------+-----------------------------
 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51117>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list