Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fatal error when LOCATE FOR field = form property
Message
De
14/01/2004 16:07:38
 
 
À
09/01/2004 00:40:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00865140
Message ID:
00866898
Vues:
12
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform