How to determine performance improvement from precompiling ASP.NET site?

Solution 1:

Difference between "pre-compiled" and "not pre-compiled", is that the "not precompiled"'s site pages will get dynamically compiled upon first request to each of those pages by .net compiler (csc.exe/vbc.exe, you can actually see them popup in task manager's processes tab). So each page will take a one time hit of compilation time, though usually its negligible. If your website also has code files in /app_code directory, those will get compiled before web sites starts up as well, so initial start up should be slightly slower than "pre-compiled" version. That is if your "non pre-compiled" site's compilation element in web.config has "batch" attribute set to false, otherwise it'll spend time compiling all the pages right at startup, which can take too long depending on size of your site. compilation Element (ASP.NET Settings Schema)

After /app_code files and, for example, default.aspx get compiled in "not pre-compiled" site though, there will be no difference in actual performance between the two.

IIS reset or an app pool recycle will not show any differences either, since after deploying one and running both, both sites are compiled. IIS Reset/app pool reset will not cause a recompilation of the "not pre-compiled" site, only changing files/redeploying will.

Take a look Understanding ASP.NET Dynamic Compilation, it's important to understand what that does to compare the two.