How can I use SiteMap more efficiently?

Posted by Bipul on Stack Overflow See other posts from Stack Overflow or by Bipul
Published on 2010-05-15T12:02:39Z Indexed on 2010/05/17 15:31 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

So, in our website we are using SiteMap. For each request we render some menu and to do that we do SiteMap.RootNode in the helper function.

Now, when I have done the profiling of my website using dotTrace, I saw the get_RootNode() is taking lot's of time(around 70-75 millisecond). But we know that the SiteMap is static. So, I am thinking in somehow I will get the SiteMap.RootNode only once in Application_Start and will access that through out each request.

So, my questions are,

Is my approach correct? How should I do that? Or is there any efficient way that I can use SiteMap.RootNode

Thanks.

© Stack Overflow or respective owner

Related posts about sitemap

Related posts about mvcsitemap