Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fatal error when LOCATE FOR field = form property
Message
From
14/01/2004 16:07:38
 
 
To
09/01/2004 00:40:42
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00865140
Message ID:
00866898
Views:
13
>Hi Bruce
>
>visualize the steps vfp has to take to get to a property.
>Even when using
>
>with myObj
>  locate for field = .myProp
>endwith
>
>vfp has to look up "myProp" in MyObj for each record.
>That is also the reason the mDot-notation gives better
>results in big queries, since the effect will be felt on each record.
>
>Easy way to test: build a complicated object path
>and try a few views / locates same object across
>different search expressions.
>
>locate for field = m.goApp.oForm.oBiz.oData.cProp
>locate for field = .oForm.oBiz.oData.cProp
>locate for field = .oBiz.oData.cProp
>locate for field = .oData.cProp
>locate for field = .cProp
>
>Copying the property into a variable ***can*** be slower in very small
>data sets, but this perf penalty is the same for each "locate", no matter
>how large the table is, since it needs only the declaration and the
>copy command. The perf penalty is nonexistent, if you can refrain
>from using with .. endwith, eg:
>
>
>with m.goApp.oForm.oBiz.oData
>  locate for field = .cProp
>endwith
>
>vs.
>
>local lcPropChk
>lcPropChk = m.goApp.oForm.oBiz.oData.cProp
>locate for field = m.lcPropChk
>
>
>
>since you need access to .cprop only once.
>
>Just another way to keep "scalable" using dbf's for large tables.
>
>HTH
>
>thomas

Hi Thomas

Thanks for the detailed explanation. The performance issues make perfect sense now.

Bruce
Previous
Reply
Map
View

Click here to load this message in the networking platform