Why does the D2010 debugger make some things much slower?
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 so开发者_如何学编程mething, 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?
Repost: Is it producing a lot of debug output (OutputDebugString)? Anything showing up in the event log?
精彩评论