Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I create classes in a vcx programatically?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01179343
Message ID:
01179741
Views:
12
>Mike,
>
>I am glad you made that statement. Years ago guys I considered super geeks were shilling class methods even though we could see the diminished performance when compared to a UDF.
>
>People hardly think about the "clock" anymore - but we should - it makes the difference between great and an average product.

I tend to not obsess over optimization unless there appears to be an issue (having said that, I'm pretty impatient with things, so I can appreciate a "snappy" app.).

I was kind of curious as to what kind of overhead a class would add, so I played around with it a bit - it seems to be approx. 5-20%, with an average of approx 16.7% (it wobbles a bit). That sounds horrible, but we're talking very small numbers. For example, at 10,000 iterations I was only seeing approx. .001 seconds difference between the two. At 1,000,000 the difference was .341 seconds.

So, if you've got a large number of iterations and/or method calls it could make a difference, but in normal usage it probably isn't worth worrying about. Like everything, you need to test it in your app to make a final decision.

Interesting stuff...
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform