Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow LOCATE command in _Assign method
Message
From
12/05/2010 15:28:40
 
 
To
12/05/2010 13:23:44
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01463679
Message ID:
01464341
Views:
53
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform