Hi
We've build a solution with multiple navigations visible on the productlist pages.
It's especially the ecom groups navigation that takes its toll.
We have the following ecom navigations active on our productlist (each rendered separately).
- Sidebar with ecom subgroups.
- Breadcrumb.
- Top mega-ecom with all available groups.
- Top left with customer specific ecom groups.
Navigation in Globalsettings:
<Navigation>
<ApplyOnliyIfPageIsInPath>true</ApplyOnliyIfPageIsInPath>
<EnableNavigationGroupSorting>False</EnableNavigationGroupSorting>
<MaxNumberOfProducts>0</MaxNumberOfProducts>
<CacheProductsMinutes>10</CacheProductsMinutes>
<ApplyStartAndEndLevelToNavigation>true</ApplyStartAndEndLevelToNavigation>
<CalcProductCountForGroup>False</CalcProductCountForGroup>
<UseOnlyCustomNavigationProvider>False</UseOnlyCustomNavigationProvider>
<CacheProductsMinute>10</CacheProductsMinute>
</Navigation>
I'm aware that this is a LOT of navigations, so some sort of performance hit is expected, but to having the navigations alone takes around 700-900 ms is too much (measured by removing all RenderNagivation calls).
Are there any quick wins we can get on navigation performance?
When looking at the debug information it primarily the following rows (which we hit 3 times on page load)
Event | FROM last | From start |
After provider (Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider) | 89 |
1505 |
CreateDataReader - took: 15,6233 ms. USE [Test-DailyCopy] DECLARE @p0 INT = 1 SELECT [Page].* FROM [Page] WHERE ( [Page].[PageParentPageID] = 0 ) AND ( [Page].[PageAreaID] = @p0 ) ORDER BY [Page].[PageSort] System.Data.IDataReader CreateDataReader(System.Data.IDbCommand, System.Data.CommandBehavior) (Dynamicweb.Data.dll) in :0 System.Data.IDataReader CreateDataReader(Dynamicweb.Data.CommandBuilder, System.Data.IDbConnection, System.Data.IDbTransaction, System.Data.CommandBehavior, Int32) (Dynamicweb.Data.dll) in :0 System.Data.IDataReader CreateDataReader(Dynamicweb.Data.CommandBuilder, System.Data.IDbConnection, System.Data.IDbTransaction, Int32) (Dynamicweb.Data.dll) in :0 Dynamicweb.Content.Page GetFirstPageForArea(Int32) (Dynamicweb.dll) in :0 Dynamicweb.Content.Page GetFirstPageForArea(Int32) (Dynamicweb.dll) in :0 Void InitializeXmlDoc() (Dynamicweb.dll) in :0 System.Xml.XmlDocument XML(Int32, Int32, Int32, Expand, Int32) (Dynamicweb.dll) in :0 System.String GetNavigationHtml(Int32, Int32, Int32, Expand, System.String, System.String, Int32, Boolean, System.Collections.Specialized.NameValueCollection, System.Collections.Specialized.NameValueCollection, IncludeMode) (Dynamicweb.dll) in :0 System.String GetNavigationHtml(System.Collections.Specialized.NameValueCollection, System.Collections.Specialized.NameValueCollection) (Dynamicweb.dll) in :0 Void Execute() () in :0 System.String RazorEngine.Templating.ITemplate.Run(RazorEngine.Templating.ExecuteContext) (RazorEngine.dll) in :0 System.String Run(RazorEngine.Templating.ITemplate, RazorEngine.Templating.DynamicViewBag) (RazorEngine.dll) in :0 System.String Parse(System.String, System.Object, RazorEngine.Templating.DynamicViewBag, System.String) (RazorEngine.dll) in :0 System.String Parse[T](System.String, T, System.String) (RazorEngine.dll) in :0 System.String RenderRazorTemplate() (Dynamicweb.dll) in :0 System.String Output() (Dynamicweb.dll) in :0 System.String Output() (Dynamicweb.dll) in :0 Void ProcessRequest(System.Web.HttpContext) (Dynamicweb.dll) in :0 |
161 | 1667 |
There seems to be an underlying issue in the call Dynamicweb.Content.Page GetFirstPageForArea(Int32) (Dynamicweb.dll) is NOT cached, its an SQL query EVERY time.