Tips and trix how to minimize the time to start an EPiServer site
Language files
Language files is parsed at start up remove unnesesary language files from the lang/ folder.
Assembly scaning
Long time to start a CMS 6 site can be solved by preventing initializing of known assemblies. This is done in EPiServerFramework.config
Example
<episerver.framework>
<scanAssembly forceBinFolderScan="false">
<add assembly="*" />
<remove assembly="MyThirdPartAssembyNotUsingCMS6Initialization" />
A tool to get a list of remove tags for your EPiServerFramework.config
Usage
Paste the file in the sites bin folder.
Execute createepiserverframeworkconfig.exe
Output
<remove assembly="MyThirdPartAssembyNotUsingCMS6Initialization" />
Copy the generated lines to your EPiServerFrameWork.config file
Test that everything working...
Download
createepiserverframeworkconfig.exe (version 0.2 NOT TESTED so be careful)
Tool suggests commenting adding EPiServer.UI to the remove list which seems to loose some of the cms tabs.
Alternative Solution
EPiServer CMS will log which assemblies contain plugins, and who do not during initialization. Add a log4net logger like this to your episerverlog.config:
<appender name="initAppender"
type="log4net.Appender.FileAppender" >
<file value="init.txt" />
<encoding value="utf-8" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level [%thread] %type.%method - %message%n" />
</layout>
</appender>
<logger name="EPiServer.Framework.Initialization"
additivity="false">
<level value="Info" />
<appender-ref ref="initAppender" />
</logger>
Start your web site and inspect the log. You'll see lines like this:
Unnecessary scanning of assembly PageTypeBuilder.Activation.StructureMap
Find all assemblies that EPiServer reports as not necessary, and remove them as explained above.
Optimize ASP.NET compilation
<configuration
<compilation defaultLanguage="c#" debug="true" optimizeCompilations="true">