Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One VCX with many classes/Many VCXs with few classes
Message
De
14/12/2001 16:43:53
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00594131
Message ID:
00594673
Vues:
21
>>Yes, that's definetely an advantage. I was aware of the advantages of keeping my classes in different libraries. Was just wondering about speed ...
>>
>
>Speed does make a difference if you use the NEWOBJECT() function. Consider this example:
>
>Avg 0.000000 SET COVERAGE TO CovTest.txt
>Avg 0.009968 CLEAR ALL
>Avg 0.008965 loLabel1 = NEWOBJECT("Label1","Lib1")
>Avg 0.009399 loLabel2 = NEWOBJECT("Label2","Lib2")
>Avg 0.002906 loLabel3 = NEWOBJECT("Label3","Lib1")
>Avg 0.002593 CLEAR ALL
>Avg 0.000140 SET COVERAGE TO
>Avg 0.000000 DO HOME()+"Coverage.app" WITH "CovTest.txt"
>
>Observe that the NEWOBJECT() function is much faster when you instantiate a class that is in the same library as already used for another instantiation before. So the 5th line would have been about 3.5 times slower if the "Label3" class would have been in another library like "Lib3".

And then this has to be weighed against the time it takes VFP to read all 800 class names from one huge lib... i.e. this example needs to be measured against the equivalent of the other case.

I think Armin can do this - he's got that huge classlib, and he can see how fast it goes. He really may be better off if that one classlib is open somewhere early in the process, and then stays in memory all the time - VFP probably won't even touch the disk anymore.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform