How can I disable batch compilation for my ASP.NET web pages so that the first user accessing the web site doesn’t experience slow performance?

The batch property of the compilation element, which is enabled by default in ASP.NET, is used to control whether the initial page request will continue to compile additional files in the same directory before completing the original request.  This can cause significant delay to the first several initial requests when enabled on moderately-sized web sites.  Once a page has been compiled during the first request, all subsequent requests are performed without any compilation delay.  In most cases, I recommend disabling this property by setting the batch compilation property value to “false” in the web.config file.  Changing this value is not necessary if you precompile your ASP.NET web site with the “updatable” flag set to false.

 

File: Web.config

<

configuration>
<system.web>
<compilation batch="false">
</system.web>
</configuration>

For more information on precompiling pages for better performance:
https://blogs.msdn.com/perfworld/archive/2009/01/29/how-can-i-precompile-my-asp-net-web-pages-so-that-the-first-user-accessing-the-web-site-doesn-t-experience-slow-performance.aspx 

For more information on the compilation element:
https://msdn.microsoft.com/en-us/library/s10awwz0.aspx