开发者

Performance benefit to pre-compiling web application project set to be updateable?

Is there any p开发者_JAVA百科erformance benefit to pre-compiling an asp.net web application if it's set to be updateable? By setting the pre-compiler updateable flag it doesn't pre-compile the aspx, ascx, etc. so those still have to be compiled at run-time on the first page load. Everything else in an ASP.NET Web Application Project is already compiled anyways though, so what is the point of running the pre-compiler on a WAP with the updateable flag set to true?


The only performance benefit is that it pre-compiles the associated code-behind files for your ASPX and ASCX files.


ASP.NET aims for performance benefits over other script-based technologies (including Classic ASP) by compiling the server-side code to one or more DLL files on the web server.[18] This compilation happens automatically the first time a page is requested (which means the developer need not perform a separate compilation step for pages). This feature provides the ease of development offered by scripting languages with the performance benefits of a compiled binary. However, the compilation might cause a noticeable but short delay to the web user when the newly-edited page is first requested from the web server, but won't again unless the page requested is updated further.

The ASPX and other resource files are placed in a virtual host on an Internet Information Services server (or other compatible ASP.NET servers; see Other Implementations, below). The first time a client requests a page, the .NET framework parses and compiles the file(s) into a .NET assembly and sends the response; subsequent requests are served from the DLL files. By default ASP.NET will compile the entire site in batches of 1000 files upon first request. If the compilation delay is causing problems, the batch size or the compilation strategy may be tweaked.

Developers can also choose to pre-compile their code before deployment, eliminating the need for just-in-time compilation in a production environment. This also eliminates the need of having the source code on the web server.

(Taken directly from the wikipedia page) A great explanation of the benefits of compiling your code over scripted code such as php or class ASP.


From what I can tell in this specific case there isn't a performance benefit to pre-compiling a WAP when it's set to updateable for the reasons listed in the question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜