Hello,
I was just looking at aspnet_compiler.exe and thinking how useful it was
to have your web site compiled, then I thought that maybe it isn't!!
What's the advantage? I would never upload a site, nor even upload a new
version of one file, without immediately testing it a browser. Thus, any
first-time compilation delay will be seen by me.
Did I miss something? TIA
Alan et al,
There are a couple advantages I can think of.
1) I can use the aspnet_compiler on a build engine to make sure there
are no errors in any of the .aspx files. If you do any sort of
continuous integration [1] in your CM process then you can let
developers know quickly if they checked in an ASPX file that the
runtime can't parse. I was never really happy that ASPX files could
escape the build process and make it to test before a simple syntax
error was caught.
2) I can pre-compile a non-updateble site and ensure that noone can
"tweak" an page in test or production. I could also deploy a site
without source any .aspx or .ascx files! (some caveats apply).
3) When combined with aspnet_merge I can reduce the number of
assemblies in a web app. A small performance benefit.
All that being said, using aspnet_compiler for performance reasons is
overrated. Getting a web application off the ground is a lot of work!
There is an appdomain to create, assemblies to resolve and load, the
cache is empty, the connection pool is empty, the JITter has to JIT,
etc. etc. The perf benefits of removing the parse/code-generation are
there, but can be dissapointing for someone who thinks it will be a
huge gain.
[1]
http://www.martinfowler.com/articles/continuousIntegration.html