Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slow Form loading in VB.Net

888 views
Skip to first unread message

Tappy Tibbons

unread,
Jun 19, 2002, 12:56:14 PM6/19/02
to
We are just starting to roll out a beta of a couple of VB.NET apps we have
been working on, and are just now encountering this as well

The apps load very, very slow(unacceptably slow) the first time loaded. Like
15-30 seconds for the startup form.

The second time, it is quite a bit better, bordering on acceptable, but
still not that great. (5-10 seconds)

The third time they are pretty quick. (1-5 seconds)

It is also the same once the app gets loaded, and I call subforms. The first
subform loads slow, the second is better, the third time is good.

From the IDE, on our blistering fast devlopment machines, they always run
pretty fast.

But, I am testing on pretty "fast" client machines(800Mhz or faster Celerons
and P3's) with 128MB or more memory.

We have compiled as Release, tried to minimize code in the startup form,
etc.

I have heard to create an ASPNET local user on Win2K/XP machines, but these
are win98 client machines. As a test, I created a domain user called ASPNET,
but that didn't help.

We have also heard to precompile the app, per machine at install time. That
seems awful kludgy, and makes it hard to roll out new updated .exe's. Also,
we intend to keep the main .exe on the server, and have each client PC call
it from a mapped network drive if possible.

Any other ideas would be appreciated.

"Zafar Iqbal" <ziqb...@hotmail.com> wrote in message
news:OqyUf40FCHA.2392@tkmsftngp04...
> I use multiple MdiChild forms in my VB.Net application. Most of the forms
> contain around 30 or so textboxes with the same amount of labels, and
other
> combo boxes and radio buttons. When they are initially loaded the forms
take
> 2-3 seconds to load, and even then they seem to display on a certain
> coordinate before actually "stretching" to the fixed size I have
allocated.
> After they are loaded the toggling between them (using BringToFront)
> "visibly" does not cause the same delay. Is there any way I can tune my
> application for a better result when a new form is loaded for the first
> time?
>
>
>
> Regards,
>
> Zafar Iqbal
>
>


Gregor Noriskin [MSFT]

unread,
Jun 21, 2002, 1:07:02 PM6/21/02
to
You might try background loading forms and then caching and reusing them.
Your frmPatient form is failry expensive to create because of the number of
controls on the form. When your app starts up you could create a number of
these of these forms (hidden) and put them in a collection (hashtable
probably). When your app needs the form you can initialize it with the
appropraite data and show the form (as opposed to creating a new one each
time). When you are done with the form simply hide it (and "clean" it if you
need to). You can make the collection failry smart i.e. it will start
creating new forms in the background if it sees that you are using all the
forms of a specific type. You may also want to make the collection grow in
the background only if you have available CPU cycles i.e. if your system is
running at 100% CPU utilization then create new form in the collection as
you ask for it, or if you are running at 50% (example) then always make sure
that you create a few more forms of a specific type than you are currently
using.

You may also want to profile your app over the instantiation of the form. It
will show you where you are spending your time. Obviously the first time you
load the form there is also going to be a cost associated with JITting the
methods that are called during the creation of the form; this cost will be
attributed to each call (in the profiler). If you want to factor out the JIT
cost, then profile a second instantion of the form (all methods will be
JITted already).

Gregor Noriskin
CLR Performance Program Manager
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.


"Zafar Iqbal" <ziqb...@hotmail.com> wrote in message

news:e2Wlr2FGCHA.2456@tkmsftngp08...
> Sorry friends
> I have attached the sample application code here. Kindly do give me a good
> response.
>
> Please Please

matro

unread,
Jul 26, 2002, 11:41:14 AM7/26/02
to
On Wed, 19 Jun 2002 11:56:14 -0500, "Tappy Tibbons"
<tappyt...@sbcglobal.net> wrote:

>From the IDE, on our blistering fast devlopment machines, they always run
>pretty fast.
>
>But, I am testing on pretty "fast" client machines(800Mhz or faster Celerons
>and P3's) with 128MB or more memory.

hey Tappy, have you got any news about this interesting issue?

--------

Francesco "Matro" Martire

RealPopup, the freeware winpopup replacer
http://www.realpopup.it

MaTreo, freeware frontscreen for your Treo
http://www.realpopup.it/matreo

0 new messages