Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
With/Endwith performance gain.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00455430
Message ID:
00455445
Views:
30
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>I know that using WITH/ENDWITH yeilds a proformance gain because the system doesn't have to drill down to the object refrence in question but does WITH This have the same effect? It seems to me that it is the current object anyway so no drilling has to take place anyway.
>
>The performance gain when only going one level deep is negligible or non-existent. The performance gain is only noticable when working with nested objects.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>I wonder if this will change in 7.0 with strong-typing? Since more checking needs to occur anyway....

Since we really aren't talking about "strong typing", I don't know that it will. I think VFP will internally still evaluate as fast as it does now. Rememeber that strong typing is used for Intellisense within the IDE and for type library information when creating COM servers. I don't think it covers anything else.

>
>As a colleague once said to me "dots are speed-bumps."

I like that.

I really got into using With a lot after a session at a DevCon. During a discussion on COM, Calvin Hsai said that a "." causes a round trip to the COM server for evaluation. He then demonstrated how painfully slow that could be when navigating several levels deep in the object hierarchy with a COM barrier in the way.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform