x64 Debug比Release更快启动 [英] x64 Debug starts quicker than Release

查看:87
本文介绍了x64 Debug比Release更快启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个Visual Basic .Net应用程序我正在Visual Studio 2012中编译(版本2或3),我发现发布版本显示形式比调试版本(1秒)慢得多(7秒)。



一旦加载,发布版本处理速度更快。我已经删除了一些外部引用,看看它们是否造成了这种情况,但它们不是。



有人有什么建议吗?



谢谢。

Hi,

I have a Visual Basic .Net application I am compiling in Visual Studio 2012 (build 2 or 3) and I have found that the Release version shows the form much slower (7 seconds) than the Debug version (1 second).

Once loaded the Release version is quicker at processing. I have removed a couple of external references to see if they were causing this but they weren't.

Does anyone have any advice please?

Thanks.

推荐答案

如果您正在谈论在Visual Studio中点击播放按钮并等待表单显示我有一些想法...



首先,调试版本是增量的,没有任何编译器优化,这意味着它们可能会更快地构建。这意味着编译器会生成代码,调试器附加,并且表单会很快弹出。



发布版本,取决于您更改的内容,可能需要是一个完整的构建,与编译器优化(循环展开,内联,未引用的变量删除等)相比,可能需要比调试构建更长的时间。这导致VS坐在那里盯着你(但底部有一个进度条),然后弹出表格。是的,这可能需要更长时间。



如果您通过双击bin \Debug或bin \ Release中的.EXE文件来运行程序,我打赌它与执行两个文件的时差不明显。虽然它在启动后可能会更快地处理。这实际上取决于你的代码在显示第一个表单之前发生的事情,因为解释器必须通过并JIT代码。
If you are talking about hitting the "play" button in Visual Studio and waiting for the form to show up, then I have some idea's...

First, debug builds are incremental and do not have any compiler optimizations, which means that they will probably build a lot faster. This means that the compiler generates the code, debugger attaches, and the form pops up pretty quickly.

Release builds, depending on what you've changed, may need to be a full build, which with compiler optimizations (loop unrolling, inlining, unreferenced variable removal, etc) can take much longer to build than a debug build. This causes VS to sit there and stare at you (but there is a progress bar at the bottom), then pop up the form. Yes, this can take longer.

If you are running the program by double clicking the .EXE file in the bin\Debug or bin\Release, I bet that its not noticeable with the time difference of executing the two files. The release one may process faster though after it starts up. It really depends on your code that happens before it shows the first form, since the interpreter has to go through and JIT the code.


这篇关于x64 Debug比Release更快启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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