Is there anyway to run through the application and pre-populate the MVC ViewCache to eliminate the 2sec time loss that can sometimes occur during the warm-up of a web app?
At current whilst our application is starting, we sometimes are greeted with 2sec performance lag times.. once it's started there are mere-milliseconds.
In case it helps, I am definitely running in release mode, and only use the Razor engine:
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
Bootstrapper.Initialise(); //IOC Setup
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
//Only use the RazorEngine. - http://blogs.msdn.com/b/marcinon/archive/2011/08/16/optimizing-mvc-view-lookup-performance.aspx
ViewEngines.Engines.Clear();
IViewEngine razorEngine = new RazorViewEngine() { FileExtensions = new string[] { "cshtml" } };
ViewEngines.Engines.Add(razorEngine);
}
Any suggestions welcome.
Ta