Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application Object Best Practices
Message
De
27/07/2011 06:07:04
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
27/07/2011 03:15:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01519029
Message ID:
01519294
Vues:
71
>I did not say to stay away from them - no problem using them. The speed penalty may not be significant. I do use them sometimes

With today's machines, the difference may be negligible, specially when we're talking about service objects which may not be accessed from tight loops.

And when they are, getting an object reference to it into a variable, then using that variable inside the loop, will run the access method only once. IOW, instead of
for i=1 to 10000
    oApp.oServiceObject.DoSomething()
endfor
which would fire the access method each time, we can do
loService=oApp.oServiceObject
for i=1 to 10000
    loService.DoSomething()
endfor

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform