c# - telerik mvc sitemap performance -
i'm using telerik's mvc extensions bind sitemap demonstrated on demos page: http://demos.telerik.com/aspnet-mvc/panelbar/sitemapbinding
but when rendering sitemap following code takes 6 seconds
<%@ control language="c#" inherits="system.web.mvc.viewusercontrol" %> <% html.telerik().panelbar() .name("sitemappanelbar") .bindto("sitemap") .render(); %>
(the same problem exists treeview instead of panelbar)
the action method executes fast
public partial class navigationcontroller : controller { public const string sitemapfile = "~/web.sitemap"; public const string sitemapname = "sitemap"; public const string sitemapkey = "sitemap"; [populatesitemap(sitemapname = sitemapname, viewdatakey = sitemapkey)] public virtual actionresult sitemap() { if (!sitemapmanager.sitemaps.containskey(sitemapkey)) { sitemapmanager.sitemaps.register<xmlsitemap>(sitemapkey, sitmap => sitmap.loadfrom(sitemapfile)); } return view(); } }
has encountered same problem and/or knows problem , how solve it?
thanks
here quote of answer in posted forum thread:
after further investigation looks out spring.web.mvc.dll issue. in case panelbar ui component check each node , children if accessible. "security trimming" feature works in case. isaccessible() method controllers , action attributes in order check item accessibility. guessed combination of application in debug mode , reference spring.web.mvc.dll cause performance issue, because retrieved attributes not cached. if need better performance suggest test in release mode. nevertheless further investigate issue , try find better solution problem. cache controllers attributes.
Comments
Post a Comment