Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed up opening of forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00146146
Message ID:
00146317
Views:
21
If your forms have pageframes you can create containers for the page contents, and then only instantiate the containers when the page they are on becomes active for the first time. Ed Leafe has classes a builder on his site (www.leafe.com) - it may be in the eBizobj stuff - that make this process easier.

Another thing to take into consideration is that the initial instantiatation of a class takes longer than subsequent instantiations (I think this has to do with Fox's caching of classes). So even if you dont show the form, instantiating it and then releasing it will at least get it into the cache.

>>if we were to open all forms and hide them before giving the user access to the program, it would take too long for the user to start the application.

You may want to track the number of times each form is used by each user. Then in the init of your application just instantiate the top 5 forms that the particular user uses.

>Hi,
>
>We find that our forms are slow to open and this partly because all objects are part of some class and they all have code in their Init() method. Most of the code is associated with resizing the forms without any restrictions for the user.
>
>To optimize the speed of opening the forms we are trying to solutions and I hope that if anyone has experience in this area we could share our thoughts.
>
>The two things we are doing is:
>
>1. When a form is closed by the user we hide it and reuse it later. This is absolutely the quickest way we have found to "open" a form. However, if we were to open all forms and hide them before giving the user access to the program, it would take too long for the user to start the application.
>
>2. We have been testing to save the already initialized form as a form and as a class and then used these instead of the original form so that the Init() don't need to run. Although we seem to save some time doing this, the forms are still slow to open. In our tests creating an object from a save class was quicker than using a saved form.
>
>Help appreciated...
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Previous
Reply
Map
View

Click here to load this message in the networking platform