Article

Generation of sitemap takes long time

« Go Back

Information

 
Article Number000094327
EnvironmentProduct: Sitefinity
Version: 5.x, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x
OS: All supported OS versions
Database: All supported Microsoft SQL Server versions
Question/Problem Description
The generation of sitemap takes a long time even though the site contains a small number of pages.

Example:
A site with 10 pages takes more than an hour.
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
There are a lot of items with "Include in Sitemap" option enabled. During the Sitemap generation, Sitefinity goes through each item and checks if that item is placed on a page in order to generate the link for the detailed view of the item.
Resolution
Disable the "Include in Sitemap" option in case there is no need to include them in the generated sitemap, as this will speed up the Sitemap generation.

The following code snippet disables the "Include in Sitemap" option for dynamic items of specific dynamic content type:
var items = dynamicModuleManager.GetDataItems(itemType).Where(i => !i.IncludeInSitemap);
foreach (var item in items)
{
item.IncludeInSitemap = false;
}

dynamicModuleManager.SaveChanges();
Workaround
Notes
Attachment 
Last Modified Date2/8/2019 3:02 PM


Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025