Optimize generation of the sitemap.xml.