Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I create classes in a vcx programatically?
Message
From
22/12/2006 09:26:53
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01179343
Message ID:
01179753
Views:
14
Hi Paul!

Merry < whatever >! :)

>>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...

Did you include the time to instantiate the object?

Build an exe with a class and a udf.PRG. You don't need to SET PROCEDURE TO or SET CLASSLIB TO to execute the udf.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform