Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Hi Terry
>I'm interested in your analysis and tests. What exactly do you mean by "access method" - a method that fires when the property is accessed? It's a good tip to look out for in future.
Yes. An access method like pcode_n10.value_access. This is fired like a UDF in the column section of a SQL. There was something about using properties "disabling" Rushmore in FoxPro Advisor some time ago, but I don't recall anything about access methods on those properties making things so much slower.
>
>Nice one
>
>By the way, again, I can't run this query at all as I'm not the thread initiator :-)
>
>Terry
>
>>Hi Terry
>>
>>Absolutely right!
>>
>>To really show the danger of this technique, run the query and time it. Then add an access method to the .value property of the pcode_n10 class. Run the queries again. Someone could innocently add an access method to the class and the whole system could slow down. In my tests (just adding an access method to a form property) the query times inflated from .38 seconds to 2.4 seconds. That's with nothing firing in the access method.
>>
>>>Denis,
>>>
>>>I'd guess it's because VFP doesn't have to look up the hierachical reference to the var, for each record it "inspects" during the SQL. Instead it has a memory var "to hand"
>>>
>>>Terry
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement