I am debating if I should make _footer.cshtml a separate page instead of making it part of the _SiteLayout.cshtml. I am currenltly having 3 different site layouts, so, it is getting ugly to copy and paste the footer in each file. But, I don't modify it often
as well. If I make a dedicated footer page just for the sake of cleaner code, how much performance tradeoff would I have to pay?
All the pages generate C# class files (or VB if you are using that), and then get compiled to dll assemblies at runtime. There should be no performance problems as a result of using RenderPage
Oh I see. Thank you so much. Since they are pre-compiled into classes, the trade off is as small as making an additional method call. That's good to know. Thank you.
magicalclick
Member
54 Points
50 Posts
RenderPage performance?
Mar 23, 2012 06:00 AM|LINK
Hello,
I am debating if I should make _footer.cshtml a separate page instead of making it part of the _SiteLayout.cshtml. I am currenltly having 3 different site layouts, so, it is getting ugly to copy and paste the footer in each file. But, I don't modify it often as well. If I make a dedicated footer page just for the sake of cleaner code, how much performance tradeoff would I have to pay?
Thank you.
Mikesdotnett...
All-Star
155597 Points
19981 Posts
Moderator
MVP
Re: RenderPage performance?
Mar 23, 2012 06:09 AM|LINK
Have you experienced any performance problems using RenderPage? If not, why are you concerned about it?
Web Pages CMS | My Site | Twitter
magicalclick
Member
54 Points
50 Posts
Re: RenderPage performance?
Mar 23, 2012 06:42 AM|LINK
I just want to know it beforehand, so, I wouldn't have to worry about it. You know, a little more informed is better prepared. =)
Mikesdotnett...
All-Star
155597 Points
19981 Posts
Moderator
MVP
Re: RenderPage performance?
Mar 23, 2012 07:46 AM|LINK
All the pages generate C# class files (or VB if you are using that), and then get compiled to dll assemblies at runtime. There should be no performance problems as a result of using RenderPage
Web Pages CMS | My Site | Twitter
magicalclick
Member
54 Points
50 Posts
Re: RenderPage performance?
Mar 23, 2012 05:54 PM|LINK
Oh I see. Thank you so much. Since they are pre-compiled into classes, the trade off is as small as making an additional method call. That's good to know. Thank you.