Windows应用程序的启动延迟 [英] Startup Delay for windows application

查看:100
本文介绍了Windows应用程序的启动延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows应用程序,在为它创建安装项目之前,我先设置了其构建选项以优化Visual Studio中的代码.将其安装在笔记本电脑上后,我注意到当我翻倍时,它需要一些时间才能启动(例如几秒钟) 单击桌面快捷方式.一旦启动,它运行速度很快,没有任何问题.

I have a windows application that I set its build options to optimize code in visual studio before creating a setup project for it. After installing it on my laptop, I noticed that it is taking some time to start (like a couple of seconds) when I double click on the desktop shorcut. Once it starts, it runs fast with no problems.

启动时我没有进行任何处理,所以我想知道Windows应用程序的正常行为吗?因为客户抱怨这件事,我应该做些什么吗?我正在使用.net 4.0和Visual Studio 2010.

I do not have any kind of processing taking place on startup, so I wonder is that a normal behavior for a windows application? Is there anything I should do for it, because the client is complaining about this? I am using .net 4.0 and visual studio 2010.

请告知...  非常感谢.

Please advise...   Many thanks in advance.

推荐答案

 

 

Hi,

 

您是否尝试禁用/optimize代码选项以测试性能问题是否由该选项引起?

Have you tried to disable /optimize code option to test whether the performance issue is caused by this option?

 

据我所知,/optimize选项启用或禁用由编译器执行的优化,以使输出文件更小,更快和更小.更高效.启用优化后, 编译器应用了许多不同的技术,以使代码运行得更快,同时仍在执行相同的操作.在Visual C ++中,优化和未优化版本之间最明显的区别是,变量值尽可能长地保存在寄存器中 在优化的版本中,如果没有优化,它们总是存储在内存中.这不仅影响代码速度,而且影响调试.作为优化的结果,调试器无法在您逐步执行时可靠地获取变量值 通过代码.

As far as I know, the /optimize option enables or disables optimizations performed by the compiler to make your output file smaller, faster, and more efficient. Once you turn on the optimizations, the compiler applies many different techniques to make the code running faster while still doing the same. The most obvious difference between optimized and unoptimized builds in Visual C++ is the fact the variable values are kept in registers as long as possible in optimized builds, while without optimizations they are always stored into the memory. This affects not only the code speed, but it also affects debugging. As a result of this optimization the debugger cannot reliably obtain a variable value as you are stepping through the code.


这篇关于Windows应用程序的启动延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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