简体   繁体   中英

What’s the benefits of Asp.net MVC projects precompilation?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM