Groups | Blog | Home
all groups > dotnet general > july 2005 >

dotnet general : Slow As Molasses


John Bailo
7/26/2005 4:44:55 PM

Is it me?

Or do Windows Forms run as slow as molasses?

I launch a child form from a parent and it takes ages to appear?

Why ?!?!
Bernie Yaeger
7/26/2005 11:37:57 PM
Hi John,

It shouldn't take long. What does the second form do in the load event or
in the initialization?

Bernie Yaeger

[quoted text, click to view]

Brooke
7/27/2005 12:00:00 AM
I have noticed that the first time that you open a .NET application that it
takes forever, but after the initial load it will load very quickly. The
Visual Studio .NET 2003 IDE is a perfect example. Restart your computer,
load VS.NET 2003 and see how long it takes to open. Closed VB.NET and start
if up again. Loads almost instantly.




[quoted text, click to view]

Olaf Baeyens
7/27/2005 12:00:00 AM
[quoted text, click to view]
It depends on what you are doing in that loding phase of the form.
Only the first time, the loading is slow since the IL is compiled into
machine code on the fly the first time you use that part of the code. But
once loaded it should run near c++ speed, tests here suggests 5% slower on
average.

Unlike C++ unmanaged code (aka conventional exe code), the code is not
compiled and optimized at compile time at the developrs PC, but at the CLR
on the users machine, optimizing it for that machine. In theory in tim you
same program wil actually run faster when new versions of the .NET framework
gets distributed. No need of recompiling the source code.

One very nice side-effect in this is that you can create a neutral .NET
program, that will run as pure 32 bit when you run it on a 32 bit machine
and pure 64 bit on a 64 bit machine.Only one distributable exist in this
case. (see upcoming Visual Studio 2005 for this)

Patrice
7/27/2005 12:00:00 AM
Timing should allow to narrow down possible problems. The next time you
could start with an empty form and time as you go so that you can see how it
evolves as you add components...
--
Patrice

"John Bailo" <jabailo@texeme.com> a écrit dans le message de
news:_cydnagqrL9oV3vfRVn-2Q@speakeasy.net...
[quoted text, click to view]

Cor Ligthert [MVP]
7/27/2005 12:00:00 AM
John,

Hi guys, I am not a native English speaker, is Molasses that what is a very
good drinkable when you have distillate it?

I could not resist

:-)

Cor

Derek Davidson
7/27/2005 3:33:14 AM
[quoted text, click to view]

I find that the first time the application loads, it is slow. But
thereafter, accessing a form that has been loaded before is fast. This
is inline with the way that WinForms and .NET was designed to work.

--
Derek Davidson
Take the S4N Poll
http://s4n.no-ip.biz/s4npoll/intro.aspx
W.G. Ryan MVP
7/27/2005 7:53:47 AM
John - is there anything special happening when the form loads (ie making a
trip to the db to grab data)? If so, you may want to use a separate thread
or async delegate to increase the responsiveness of the UI. If that's not
the problem, it may well just be due to the inherent performance associated
with a managed runtime. Does this problem persist across the board or just
on a specific form or app?
[quoted text, click to view]

John Bailo
7/27/2005 8:55:21 AM
[quoted text, click to view]

Great idea...it's populating a combo box from a web method (connected to
a database)...so I'll thread that.

However, my impression from other forms in this app, that are not
database bound, is that they are slow.

I even broke out of VS.NET which I had been assuming was the reason that
the forms were so slow, and, using a version compiled for Release, and
found that they were slow.


[quoted text, click to view]
Cool Guy
7/27/2005 9:34:50 AM
[quoted text, click to view]

W.G. Ryan MVP
7/27/2005 3:46:53 PM
Molasses is a thick syrup and IMHO, quite disgusting. It's kind of like old
motor oil from your car, with some sugar added to it
[quoted text, click to view]

Bernie Yaeger
7/27/2005 3:49:39 PM
Hi Cor,

I think you have too much time on your hands!

Regards,

Bernie

[quoted text, click to view]

AddThis Social Bookmark Button