我正在使用 WinForms、Visual Studio 2013、.Net 4.5
当通过 Visual Studio Profiler 运行我的应用程序时,它完全按照应有的方式工作,而当通过调试或 Release模式运行它时,我面临可怕的卡住和重新绘制问题。
在 Visual Studio Profiler 中运行应用程序与通过 Release模式运行应用程序有什么区别?
提前致谢
请您参考如下方法:
终于在这里找到了答案: Why does my program run way faster when I enable profiling?
When you run your application within Visual Studio, the debugger is attached to it. When you run it using the profiler, the debugger is not attached.
If you press F5 to run your program, even with the Release build, the debugger is still attached.
自从我通过 Visual Studio 运行我的应用程序后,我看到了一些非常奇怪的行为,例如重绘缓慢、卡住等。- 我花了几天时间追查常见的嫌疑人、双缓冲、不从后台线程调用、丢失锁等等,事实证明我正在追逐一个一开始就不存在的错误。希望这可以节省一些人的时间或头痛。
