Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How does VFP load class methods into memory?
Message
From
16/11/2009 02:48:53
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01434853
Message ID:
01434899
Views:
105
>Hi,
>
>I am thinking if it is better to break a class into two classes and have one inherit from another. Mainly I am considering this to see if I can speed up loading the objects using the class. I have not quantified the speed of loading the objects, this is just a guess that the speed can be improved. Some forms can have up to about 20 objects using this class (as base or are instantiated in the INIT method).
>
>The class has 16 methods. Only 8 of them are used in one part of the program. All 16 are used only in some other parts of the application. My question is, does VFP 9, when instantiating the class, loads the code from all 16 methods into memory? Or it only loads the method when the method is used?
>
>TIA.

I wonder whether the number of methods (8 or 16 here) is going to influence the speed of instantiating the objects. The code is the same for any one class. So, I'd say that the methods are loaded only once and shared amongst the objects of the same class. The 'load more code' penalty, if any, only happens once imo
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform