Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Performance with many objects
Message
 
To
08/04/2002 13:44:59
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00642280
Message ID:
00642296
Views:
10
Jack;

I do not know the requirements of your application but in general addobject will give you a performance hit. I worked on one such application where addobject had to be used. There are occasions where this is necessary.

A general rule I have tried to obey is to take not more than 1.5 seconds for a form to instantiate. More time than 1.5 seconds and a user becomes concerned which is not good.

A vcx file seems to speed things up over creation using procedural code. However, you have to watch out that your vcx library does not become too “heavy” as that can also give you a hit. Another area to consider is how do you populate the forms with data? The quickest way is to open tables first when the application is first brought up. Then the forms do not have to wait for the data to be available. Users are "more patient" when an application first is brought up. Waiting for a form is a different story.

There are a few things you can do to speed up this process. The biggest problem is to define a realistic CPU speed as a suggested minimum for your application. Choose a real number that seems practical and use that as your benchmark and make that a system requirement. If someone has a 100 Mhz CPU it may prevent a sale of your product. It may be impossible to satisfy such a customer. It is understood that not all customers run out to buy the fastest equipment when it becomes available (every other day?) but there has to be a realistic balance between computer speed and application requirements.

Add network issues and you have a real world environment. :)


Tom


>We are looking for ways to speed up object instantiation for a large number of objects
>
>Our application involves a complicated form with many hundreds of fields. We want to be able to display this form completely with all of the fields simultaneously on screen.
>
>It works fine on newer faster computers. On older computers (<500mhz, there seems to be a sudden jump in the loading time. For example 700 MHz ... 10 seconds, 450 MHz over a minute. This effect is pretty much the same regardless of the amount of memory in the computer.
>
>For marketing purposes, we need the program to be useable on these older machines. We will lose a significant share of the market if our application only runs on new machines.
>
>Profiling tells us that a large portion of time is spent on addobject statements. (Once the objects are created, the performance is acceptable)
>
>The objects are mostly non-visual objects that are being created in code classes in a procedure file. We are wondering if defining these objects in a VCX might significantly increase performance.
>
>We thought of the SaveAsClass feature but it can't be used here because of the non-visual classes. Is there any other way to quickly instantiate a large container object, which includes many other objects, without executing all the individual addobject statements?
>
>I'd appreciate any tips you might have to help deal with this situation.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform