Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Opening in Debug Mode Taking Long Time
Message
From
23/08/2007 15:45:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Form Opening in Debug Mode Taking Long Time
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01250008
Message ID:
01250008
Views:
60
I have a form that has many controls on it -- classes of buttons, OLE, etc. When I compile the project into an application (the form is a Top-Level and forms the application) and run it the time to open the form is 0.062 sec. I have added a debugging option to record the time of various controls triggering of the Init() events based on a time-difference from the Form Load() event. The sequence is:

Load Event: 15:27:350
grdWhereUsed - Init Event: 0
grdErrors - Init Event: 0.015
grdBookMarks - Init Event: 0.015
Icons - Init Event: 0.031
Treeview1 - Init Event: 0.031
windowposition - Init Event: 0.031
CodeMaxTabs - Init Event: 0.031
oleImages - Init Event: 0.031
Viewtabs1 - Init Event: 0.047
tmrAutoSave - Init Event: 0.047
codemaxsearch - Init Event: 0.047
CodeMax - Init Event: 0.062

Now, if the debugger is opened, the event time looks like this:

Load Event: 15:28:380
grdWhereUsed - Init Event: 0.938
grdErrors - Init Event: 5.953
grdBookMarks - Init Event: 8.969
Icons - Init Event: 12.125
Treeview1 - Init Event: 12.297
windowposition - Init Event: 12.485
CodeMaxTabs - Init Event: 12.703
oleImages - Init Event: 21.125
Viewtabs1 - Init Event: 21.391
tmrAutoSave - Init Event: 21.563
codemaxsearch - Init Event: 21.750


Also, notice that the final event didn't occur (the app hangs and VFP has to be killed). Now if I close the debugger and recompile the project and execute the application -- it runs fast. Now open the debug and restart the the application it executes fast (a little slower than without debugger). Now close VFP, open VFP, open the debugger, and execute the application. The time is slow again and it hangs. If the project is compiled with the debugger open, then the application runs slow when the debugger is open.

I can compile with or without debug information in the application -- either way does not seem to change the behavior.

Not sure what is going on here -- has anyone seen this behavior or have any clue to how to proceed. I would like to have performance with or without the debugger open...

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform