Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow LOCATE command in _Assign method
Message
De
12/05/2010 15:28:40
 
 
À
12/05/2010 13:23:44
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01463679
Message ID:
01464341
Vues:
54
>
>Notice that the object approaches are not even close to each other in either run. I'm surprised that the WITH is so much slower. I'm happy the memvar beats the literal, how often do we get to search for a literal?

Perhaps slower times for the WITH has something to do with needing to locate the context for the property? I'm guessing that it (the p-engine) needs to backtrace through levels of stack frames in the control stack whenever you access through a WITH to locate the object context. So I'd figure that you'd see a difference in execution speed if you changed

WITH object-ref
loop-construct
(statements with dot-references to properties and methods)
end-loop-construct
ENDWITH

to something like

oRef = object-ref
loop-construct
(statements with properties and methods through oRef)
end-loop-construct
oRef = .NULL. && unlink reference
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform