Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One VCX with many classes/Many VCXs with few classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00594131
Message ID:
00594387
Views:
20
>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".
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform