Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The m. variable thing, the sequel
Message
 
 
À
03/01/2005 19:15:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
00969478
Message ID:
00974262
Vues:
42
>>>>Do you realize if you really want to avoid this 100%, you´ll have to code.
>>>>m.MyObject.Myproperty ISO MyObject.MyProperty
>>>>m.THIS.MyProperty ISO THIS.MyProperty
>>>>m.THISFORM.MyProperty ISO THISFORM.MyProperty ?????
>>
>>>>Please look at you source code and tell honestly you did this consistently...
>>>
>>>If you look into my source code, you see only, say 1000% this coding form!
>>>
>>> m.blabla.blublu
>>> m.thisformset
>>>....
>>>
>>>Nothing of strange for me. Therefore it must be made.
>>
>>I put "m." before objects and variables.
>>I don't put it before THIS or THISFORM.
>>I just hope nobody creates a table with one of those names!
>>
>>>
>>>Fabio
>
>Well, but, it remembers, with this you have a speed issue.
>
>
>clear
>FOR k=1 TO 10000000
>NEXT
>
>CLOSE TABLES all
>
>create CURSOR myCursor ( f1 i,f2 i)
>
>x=[USE DBF("myCursor") AGAIN IN 0 ALIAS another]
>
>totalWA = 10
>test()
>FOR k=0 TO totalWA
>    FOR i=1 TO 50
>	Y=m.x+LTRIM(STR(m.k*50+m.i))
>    	&Y
>    NEXT
>    test()
>NEXT
>
>
>CLOSE TABLES all
>
>PROCEDURE test
>    WITH CREATEOBJECT("myClass")
>    	SELECT 0
>    	? "Workareas ",SELECT()-1,"without M"
>		t1=SECONDS()
>			.test
>		?? SECONDS()-m.t1,"with M"
>		t1=SECONDS()
>			.testM
>		?? SECONDS()-m.t1
>	ENDWITH
>	
>DEFINE CLASS myClass as Custom
>
>    someProperty1 = .F.
>    someProperty2 = .F.
>    PROCEDURE test
>    	FOR j=1 TO 1000000
>       		=this.someProperty1 and this.someProperty2
>        NEXT
>    PROCEDURE testM
>    	FOR j=1 TO 1000000
>       		=m.this.someProperty1 and m.this.someProperty2
>        NEXT
>ENDPROC
>
>
>Then, you create a application, all the applications, or die or become more complex, then :
>
>- Revision 0:  3 workAreas ( m.this is not a issue )
>- Revision 1: 10 workAreas ( m.this is not a true issue )
>...
>- Revision 24: 67 workAreas( m.this is a issue now ( -25% speed ))
>
>
>Fabio

Thank you for pointing this speed issue with "m."
I hadn't thought of that.
- Andy Rice
San Diego, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform