(25)Use the startMode attribute to reduce the load time for your ASP.NET site緩存
招數25:ci
使用startMode屬性來減小ASP.NET站點加載時間it
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屬性實現。你甚至能夠指定一個自定義動做在啓動時運行,例如預填充一個數據緩存。io