Yearly sitemaps use too much memory and make very long queries
-
Sitemap from a year 2018 (for example, but it’s true for any year) crashes due to ridiculously high usages of memory (500+ MB) and very long queries (17k+ character). That year has around 2100 posts. Question is, why is a sitemap being generated on every request? Especially for a year, that has already concluded? Surely some optimizations can be made regarding both problems:
1. Generate (update) sitemap only when a new object that’s included in sitemap is added to db or an existing one is updated as opposed to generating a whole sitemap on every request.
2. Possibly introduce some static into sitemaps, especially for past years
3. Do processing in chunks instead of doing uber long queries for all meta, then all terms, etc.
- The topic ‘Yearly sitemaps use too much memory and make very long queries’ is closed to new replies.