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.