vc++:发布版本运行时的差异 [英] vc++: differences in runtimes of release build

查看:28
本文介绍了vc++:发布版本运行时的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在发布模式下构建我的项目时,右键单击该项目并说 debug > start new instance,这大约需要 49 秒才能运行(这是一项大任务)当我转到项目文件夹中的发布文件夹并单击 .exe 时,需要 130 秒.当我将 exe 移动到包含所有依赖 dll 的文件夹时,需要 220 秒.

when I build my project in release mode, right click the project and say debug > start new instance, this takes about 49 seconds to run(its a large task) when i go to the release folder in the project folder and click the .exe it takes 130 seconds. when I move the exe to a folder with all the dependent dll's it takes 220 seconds.

为什么会这样?为什么执行时间有显着差异?

Why is this happening? Why the significant difference in execution times?

推荐答案

这对我来说是可疑的,因为当您在调试器中运行代码时,它会启用额外的调试挂钩,根据我的经验,这会导致在 IDE 中运行时执行速度变慢比外面.出于这个原因,我从未在 Visual Studio 中运行 Release Build 性能测试.

This is suspect to me, because when you run code in the debugger, it enables extra debugging hooks which in my experience result in SLOWER execution when run inside the IDE than outside. I never run Release Build performance tests within Visual Studio for this reason.

您确定在 IDE 之外运行时您没有错误地选择所有或部分依赖二进制文件的调试版本吗?

Are you sure that when you run outside the IDE you are not mistakenly picking up Debug versions of all or part of your dependent binaries?

这篇关于vc++:发布版本运行时的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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