The program runs slower when compiled
Any suggestions as to why the VB6 program will be slower when compiling than running in the debugger? I am compiling it using "Optimize for Fast Code".
Notes: I am measuring performance by running the compiled version and the uncompiled version on the same machine. I based my predictions on the wall clock, since 30 minutes versus 100 minutes is a big enough difference to be visible.
source to share
Several months ago I set up a debugging tool to bind to my program whenever it starts up. I completely forgot I did it.
Special thanks to Process Monitor for making this very obvious.
Disabling this mode made the program run faster.
AppVerifier , for those interested.
source to share
You must choose to compile to Source Code .
Compiling with the P-code parameter forces your program to run in interpreted mode, which can be slower.
There are some optimizations in the advanced section. Try them too.
A few more notes:
Are you using a running application in the same environment? Does it accept the same data as the input?
How did you know it was slow? What if your time program is wrong?
source to share
How do you rate the performance?
It is difficult to measure performance from what you just said. Do you have to make sure that the work environment must be the same for performance comparison?
Do you work with one machine? Are you connecting to DB? Does the DB have the same workload on different runs? You need to isolate other factors before making this decision.
source to share