为什么 D2010 调试器使某些事情变得更慢?
我有一个特殊的组合框,其中包含很长的项目列表(几千个),当您打开它时必须对其进行计算。当我测试某些东西时,我惊讶地发现打开需要大约一分钟。因此,我将程序(相同的构建、相同的选项)连接到 Sampling Profiler,看看是什么花了这么长时间,结果只花了大约 5 秒就打开了。我尝试直接从 Windows 运行它,这次只花了 2-3 秒,这正是我的预期。
那么,为什么当 Delphi 调试器连接到完全相同的 EXE 时,它处理数字的速度要慢 25 倍以上呢?这并不像评估条件断点那样明显。似乎调试器的存在就让它变得缓慢。有谁知道为什么?
I've got a special combo box with a very long list of items (a few thousand) that has to be calculated when you open it. When I was testing something, I was horrified to find that it took about a minute to open. So I hooked the program (same build, same options) up to Sampling Profiler to see what was taking so long, and it only took about 5 seconds to open. I tried running it directly from Windows, and this time it only took 2-3 seconds, which is what I expected.
So why does the exact same EXE crunch the numbers more than 25 times slower when the Delphi debugger is hooked up to it? It's not anything obvious like conditional breakpoints being evaluated. It seems that just the presence of the debugger is slowing it to a crawl. Does anyone know why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
重新发布:它是否会产生大量调试输出(OutputDebugString)?事件日志中有什么显示吗?
Repost: Is it producing a lot of debug output (OutputDebugString)? Anything showing up in the event log?