调试时如何加快和优化asp.net网站的编译器构建 [英] how to speed up and optimize compiler build of asp.net site when debugging

查看:63
本文介绍了调试时如何加快和优化asp.net网站的编译器构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2008/2010/ASP.NET:

Visual Studio 2008/2010/ASP.NET:

重建解决方案后如何加快延迟?

How to speed up the delay after rebuilding the solution?

我想在测试更改或调试问题时分离调试器,而这些问题或调试问题可以通过简单的跟踪跟踪来确定.

I like to detach my debugger while testing my changes or debugging issues that can be pinpointed by a simple strack trace.

修复错误后,我将构建解决方案,然后刷新页面.

After I fix a bug, I build the solution and then refresh the page.

在重建之后,网页显示之前会出现初始滞后时间.

There's that initial lag time that occurs after the rebuild before the web page displays.

在那之后,它的速度应该是应该的.我听说此期间应用程序正在加载所有新的DLL.

After that, it's as fast as it should be. I heard that the application is loading up all the new DLLs during this time.

有什么方法可以减少这种滞后吗?

Is there any way to reduce the amount of this lag?

推荐答案

您可以将 optimizeCompilations 设置为true,将 batch 设置为false

You can set the optimizeCompilations to true, and batch to false

<compilation batch="false" optimizeCompilations="true" ... >

batch = false 对asp.net说,仅在需要时构建您调用的页面.我们将batch设置为true,仅在发布的实时站点上将其设置为true,因此asp.net会在一个页面上编译很多页面,您可能会有很大的延迟,但是只有一个页面...

batch=false says to asp.net to build if necessary only the page that you call. We set batch to true, only on release live site to so the asp.net compiles many pages at ones, and you may have a big delay but only ones...

optimizeCompilations = true 说,每个页面在每次运行时都不会检查库更新.这有个小问题-例如,如果您更改了一个从4页调用的全局静态函数,则这4页不知道此函数会更改,因此您只需要打开它们并保存它们,以强制编译器重新执行该操作即可.编译它们.否则它们会因为未检查是否发生更改而抛出错误-您必须知道并更新它们以强制重新编译.

The optimizeCompilations=true says that each page is not check for libraries updates each time its runs. This have a minor issue - if you change a global static function for example that is called from 4 pages, this 4 pages did not know that this function change, so you need to just open them and saved them, to force compiler to re-compile them. Or else they throw error because they did not check if something change - you must know that and updates them to force the re-compile.

参考: CompilationSection班级

这篇关于调试时如何加快和优化asp.net网站的编译器构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆