Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How much faster or slower is to use with..endwith?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00407175
Message ID:
00407575
Views:
23
Goes to show I'm lucky sometimes - I went back to my most recent Word automation which I'd done with WITH/ENDWITH, did a quick search/replace to remove all of the With/Endwith constructs and re-ran the document. You're right - the time elapsed over several runs was significantly higher. Glad I did it right before distributing it, but now I'll know WHY to do it this way in the future.

Thanks,
Barbara

>When working with VFP innate objects and custom objects created with VFP constructs the difference in access time can be minimal.
>
>But try this same technique when there is a COM barrier between you and the other object (e.g. Word, Excel, custom VFP COM server) and you see the benefits of With/Endwith very quickly. It can shave seconds off processing time instead of milliseconds. It is for this reason I use With/Endwith almost exclusively. The only time I don't is when I have 1 PEM to access.
>
>Just my $0.02.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform