Task #99157
openPerformance optimize sitemap.xml generation
0%
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:
- URL (for page 5): https://mysite/en/sitemap.xml?page=5&sitemap=pages&cHash=179f57abab819f22b0581465651db76d
- Time: 1 minute, 26 seconds
(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;
Updated by Christian Eßl over 1 year ago
- Related to Task #100100: Improve performance of PagesXmlSitemapDataProvider added
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review over 1 year ago
Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044
Updated by Gerrit Code Review about 1 month ago
Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78044