It seems that the first view load takes noticeably more time than when the controller does not use view and just return something like Content("<html>....</html>").
[Route("/with_view")] public IActionResult with_view() { return View("with_view"); } [Route("/without_view")] public IActionResult without_view() { return Content("<html>....</html>"); }
The "without_view" response is almost instant, while "with_view" takes a few seconds. Is there any way to precompile the views?