Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An expesive (timewise) line
Message
From
01/03/2001 19:26:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
An expesive (timewise) line
Miscellaneous
Thread ID:
00481193
Message ID:
00481193
Views:
53
I'm trying to optimize a form-based business object. In testing I've set up a program which calls the form using
Do form boExtInv Name oBOExtInv Linked Noshow

This business object was handling 100 transactions in about 36 seconds. After working at it a bit I got it down to 100 trans in 25 seconds mainly by inlineing some code and getting rid of macro expansion. Just for a lark I removed the business method call whose function is to initialize the object variables. This method contains a block of code like

With oObject
.cVarname = 0
.tVarname = {}
... and so on
Endwith

Now the program is handline 100 transactions in 12 seconds. Now I added in one line to the scan ... endscan loop that sets one object variable to 0, and the time goes back to 25 seconds. So inlineing one command which sets an object
variable to 0 doubles the time that the scan .. endscan requires to traverse 100 records.
I'm going to pull out the Mac Rubel articles in Foxpro Advisor and reread them but does this sound right?
Next
Reply
Map
View

Click here to load this message in the networking platform