Preload Forms

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Hi all,
I am still trying to find ways to speed up my app. My
users are used to doing the same application on tablet
PCs that are p3 600s and I know they won't be happy with
the speed of the PPC (they won't understand the slower
processor).

Anyways my app is only 5 forms of which 3 are actually
used all the time. How can I load ALL of them at start
up then keep them loaded and just showdialog and hide,
and repopulate data to speed it up.

Is this a valid solution???

Also if any of you pros would like to check it out...
give me some pointers, I think our company can come up
with some $$$

Thanks,
Aaron
 
what about a "App" class ?
and call its method instead of new ScreenX()
all the benefit of both lazy and single allocation

class App
{
static Screen1 screen1;
public static Screen1 Screen1
{
get
{
if(screen1 == null)
screen1 = new Screen1();
return screen1;
}
}
static Screen2 screen2;
public static Screen2 Screen2
{
get
{
if(screen2 == null)
screen2 = new Screen2();
return screen2;
}
}
}
 
Aaron,

We had a similar problem with speed. Our solution was to
generate a workerThread that populates all
listviews,datagrids,comboboxes and forms the first time
the user logs in. This means that the first login is a
little slow(not too slow in a medium size app) and
thereafter it is quick. This worked in tandum with our
strategy as we are implementing an application that will
never really be turned off.
In addition, if your forms are still loading slowly,
there is a routine on the following
http://smartdevice.microsoftdev.com/Learn/Articles/565.asp
x
that will help improve performance but can only
practically be used when the project is at the end of its
development cycle as the code is inserted into the
windows generated code of your project. This means that
each time you add some new code and debug the code
reverts.
Hope this is of some use to you.
 
Aaron,

I would be willing to look at it and determine if I think I could
speed it up. Based on what gains I think may be possible, we could
then discuss $$$. I have some experience in this area. What is slow?
The form loading? just normal use/navigation? More detail here would
be appreciated. Send me mail directly.

Bill
 
Back
Top