Frage

I am using a dynamic node provider which contains 6000 nodes in total. The first time a razor view is requested which contains @Html.MvcSiteMap().SiteMapPath(), the page can take up to 7500ms to load.

The time is all taken up within this call as when profiling my code within the dynamic node provider it takes 28ms.

If I take out all of the dynamic nodes in the mvc.sitemap the code returns very quick 280ms.

Is there any way to pre-load this - I am using IIS 7 and therefore cant use the app warm up module or the new app startup warming part if IIS 7.5.

I'm using the latest NuGet version 3.2.1

War es hilfreich?

Lösung

Performance has been significantly improved in MvcSiteMapProvider v4 due to several enhancements:

  1. The internal dictionaries now use generics rather than HashTable (which uses System.Object).
  2. The type passed around is now ISiteMapNode, so it no longer needs to be casted before it is used.
  3. The cache has been completely redesigned to take advantage of the System.Runtime.Caching.ObjectCache extension point of .NET.
  4. The ACL module has been streamlined to execute faster.
  5. Request caching is now done automatically on some expensive operations.
  6. The menu and sitemap have been reworked to call the ACL module only when necessary.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top