Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application Object Best Practices
Message
From
27/07/2011 06:07:04
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
27/07/2011 03:15:10
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01519029
Message ID:
01519294
Views:
70
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform