Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An expesive (timewise) line
Message
De
01/03/2001 19:26:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
An expesive (timewise) line
Divers
Thread ID:
00481193
Message ID:
00481193
Vues:
54
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform