DotNetNuke 是一个大型 ASP.NET CMS,大部分是预编译的,其中包含的大多数模块也是如此。
当我们部署我们的 DotNetNuke 站点更改时,我们有两个在第一个页面点击时发生的重新编译。
有没有办法将更多的 CPU 容量分配给在 IIS 7 中编译 asp.net 站点?
问答
您应该使用预编译的 ASP.NET。你为什么不呢?
你怎么知道它正在重新编译而不是填充缓存之类的?
最佳答案
设置 <compilation optimizeCompilations="true" />
Specifies whether dynamic compilation will recompile an entire site if a top-level file is changed. Top-level files include the Global.asax file and all files in the Bin and App_Code folders. If True, only changed files are recompiled.
来源:compilation Element (ASP.NET Settings Schema)
有关利弊的更多信息,请访问 Understanding ASP.NET Dynamic Compilation ,在优化动态编译下。错误的主要原因是现有方法签名的删除或更改,导致已编译的页面在重新编译之前抛出 MissingMethodException。
您还可以考虑减少批量编译的批量大小,或完全禁用它。我相信这会减少单页的编译时间,但会生成更多的程序集并消耗更多的内存。
关于.net - 当我的大型 ASP.NET 站点更新时,IIS 必须重新编译其中的很多内容。有没有办法显着减少我的编译时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6612976/