Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow LOCATE command in _Assign method
Message
De
10/05/2010 23:38:16
 
 
À
07/05/2010 16:53:03
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:
01464080
Vues:
46
Is there an implict loop with LOCATE?

>Accessing a property is slower than access a variable. But still, I wouldn't expect it to be THAT much slower.
>
>
>>Well, it figures . . . I was looking at the code again right after posting this and I believe it's fixed now. In the _ASSIGN method (WorksheetId_Assign, to be specific), I was accessing the WorksheetId form property. Hmmm . . . accessing the property within the _ASSIGN method. There is no _ACCESS method, but I wondered if that was somehow causing a problem. The code was:
>>
>>LOCATE FOR ID = .WORKSHEETID
>>
>>(within a WITH THIS block)
>>
>>So I did this:
>>
>>Ws2Locate = .WORKSHEETID
>>LOCATE FOR ID = Ws2Locate
>>
>>and now it's very fast. Yet the Ws2Locate = .WORKSHEETID line is not slow. So maybe it's a combination of some other factors like the _ASSIGN method, the WITH THIS block, etc. Anyway, it seems to be working fine now.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform