教你50招提升ASP.NET性能(十四):使用startMode属性来减少ASP.NET站点加载时间

(25)Use the startMode attribute to reduce the load time for your ASP.NET site

招数25:

使用startMode属性来减少ASP.NET站点加载时间

 

Every time you update your site, IIS must recompile it during the first request, so the initial request takes significantly longer than subsequent ones. An easy solution is to tell IIS to automatically recompile your site as part of the update process. This can be done using the startMode attribute in the ApplicationHost.config file. You can even specify a custom action to run on start-up, such as pre-populating a data cache.
每次更新你的站点,IIS必须在第一次请求重新编译,所以初始请求的时间大大超过后续请求的时间。一个简单的解决方案是在更新的过程中告诉IIS自动重新编译你的站点。这可以通过在ApplicationHost.config文件中使用startMode属性实现。你甚至可以指定一个自定义动作在启动时运行,例如预填充一个数据缓存。

posted @ 2013-07-22 14:07  安布雷拉  阅读(444)  评论(0编辑  收藏  举报