General information
Category:
Coding, syntax & commands
Title:
An expesive (timewise) line
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only