Project

General

Profile

Actions

Task #99157

open

Performance optimize sitemap.xml generation

Added by Sybille Peters over 1 year ago. Updated 10 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2022-11-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
performance, sitemap, large-site
Complexity:
Sprint Focus:

Description

Loading sitemap.xml seemed slow, had load time of more than 20s (see measurements below of over a minute).

- the cache duration (seo_sitemap.config.cache_period) for sitemaps is by default 900 (15 minutes) which seems very short as the average page cache time is 24h. While having a fresh sitemap is of course prefereable. But, due to the long load time, this means the sitemap is effectively broken on large sites, until it is warmed up again. (the cache duration can of course be overridden but it remains the default)
- There is an SQL fetch with select * (all fields) . It is probably not necessary to fetch all the fields.

SELECT * FROM `pages` WHERE (`uid` IN (57119 ...)) AND (no_index = 0) AND (`doktype` NOT IN (3, 4, 6, 7, 199, 254, 255)) AND ((`pages`.`deleted` = 0) AND (`pages`.`hidden` = 0) AND (`pages`.`starttime` <= 1669052220) AND ((`pages`.`endtime` = 0) OR (`pages`.`endtime` > 1669052220))) ORDER BY `uid` ASC

This alone does not contribute to the long load time, but it might be possible to make some of the SQL queries more efficient.

System

- TYPO3 11.5.19
- pages in sitemap (default language): ~25000
- also news in sitemap (default language): ~15000

Measurements

Feching the individual sitemaps for translated pages seems especially slow.

After a full cache flush:

(default language is German, English is translation)

DB queries

SELECT * FROM `pages` WHERE (`uid` IN (57119 ...)) AND (no_index = 0) AND (`doktype` NOT IN (3, 4, 6, 7, 199, 254, 255)) AND ((`pages`.`deleted` = 0) AND (`pages`.`hidden` = 0) AND (`pages`.`starttime` <= 1669052220) AND ((`pages`.`endtime` = 0) OR (`pages`.`endtime` > 1669052220))) ORDER BY `uid` ASC;


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Task #100100: Improve performance of PagesXmlSitemapDataProviderUnder Review2023-03-06

Actions
Actions

Also available in: Atom PDF