0

My ASP.NET MVC project is taking more time than usual on the first hit,and it gets better afterwards, but the response goes slow again every next day. so It's a continuous performance issue

I googled the issue and most of the solutions are choosing precompilation during publishing, but Microsoft officials seemly didn’t confirm the operation can result in fast startup time for every request at any time.

So what exactly are the benefits of ASP.NET MVC Precompilation? Please advise

Zeeshan Adil
  • 1,937
  • 5
  • 23
  • 42
Biao
  • 3
  • 3
  • Also see https://stackoverflow.com/questions/23235890/is-it-possible-to-disable-asp-net-website-sleep-in-iis, if what you're going for is faster responses after long periods of time – mariocatch May 07 '18 at 04:12

1 Answers1

5

You can basically find the information here, there is also a fair amount of other relevant information on the advantages

ASP.NET Web Site Project Precompilation Overview

Precompiling an ASP.NET Web site project provides the following advantages:

> Faster initial response time for users, because pages and code files do not have to be compiled the first time that they are requested. This is especially useful on large sites that are frequently updated.

A means to identify compile-time bugs before users see a site. (You can also accomplish this when you compile a project in Visual Studio.)

The ability to create a compiled version of the site that can be deployed to a production server without source code. This makes sure that that people who have access to the production server will not be able to view the source code.

You can also find similar questions here

What is the advantage of the ASP.NET precompilation?

What effect does the new precompile during publishing option have on MVC4 applications?

And some related information here

Precompiling Your Website (C#)

Because the pages must be automatically compiled when they are first visited, there can be a short but noticeable delay when an ASP.NET page is requested for the first time after being deployed.

TheGeneral
  • 79,002
  • 9
  • 103
  • 141