We are having serious issues in the startup (boot) time of our application.
After carefull investigation we have discovered that the most time is consumed by first-time-visit compilation of the cshtml files. This compilation can take up to 50 seconds per cshtml file.
We use Helix architecture with a lot of components. The combination of all those compilations takes ages and it can take up between 20 and 30 minutes for the site to boot. Once all cshtml have been hit once, the site speed and performance is ok.
Example: this cshtml takes 43 seconds to compile!
@using Sitecore.Mvc
@inherits System.Web.Mvc.WebViewPage
@inherits Glass.Mapper.Sc.Web.Mvc.GlassView<Feature.PageLayout.Models.PageSectionViewModel>
@{
var sectionClasses = Model.Presentation.BackgroundColor != null ? Model.Presentation.BackgroundColor.CssClass : "";
}
<section class="section-box @sectionClasses">
<div class="container">
@Html.Sitecore().DynamicPlaceholder("pagelayout-pagesection")
</div>
</section>
We have tried to precompile our cshtml files. This was a major difference and we had the site cold started in under 3 minutes. Unfortunatly, we can only precompile our own code, and we don't have precompiled cshtml and aspx from Sitecore, causing the platform not to work giving the error that those pages are not precompiled. (e.g. login page, experience editor, ...) So precompilation is out of the option.
On IaaS platforms, we do not experience this compilation time of cshtml taking up so much time.
My question: Did anyone experience the same kind of issues? Are there any settings in Azure PaaS that we are missing?
Sitecore.Speak.Components.Web
andSitecore.Speak.Web
). Which version of Sitecore are you using?