The setting can be found in the section <compilation …>
What did we change?
The original line reads:
<compilation debug="true" strict="false">
and we changed it to
<compilation debug="true" strict="false" optimizeCompilations="true">
So we added one switch (during the development cycle).
How does this helps you?
A copy from MSDN documentation: “By default, when any change is made to a top-level file in a Web site, the whole site is recompiled. Top-level files include the global.asax file and all files in the bin and App_Code folders. It is safest to recompile everything when one of these files changes because other files in the site, such as .aspx and .ascx files, may reference the objects created by code in top-level files.”
The DNN bin folder contains a lot of (large) DLL’s and also supports dynamic compilation. So whenever you copy (build) the DLL into the bin folder as a result of your module development, your whole development site will recompile, taking several seconds, if not up to more than a minute or so. Adding the switch prevents this, only the affected files will be recompiled. And this can be no file at all, since you only placed your newly compiled DLL into the bin folder.
How much does it help?
We now apply this setting to our development environments. Experimenting showed us that a site refresh after a rebuild of a module goes down from 20-30 second or more to less than 2 seconds, sometimes even less than 1 second. If you ever want a full recompile, just change the setting to “false” for one time, and since your web.config is touched by this edit, the full recompile will occur directly at the next site refresh.