Winform slow start time for simple app

M

Matt Witherspoon

Hello, I have a Windows Forms application in .NET 2.0 and am experiencing
extremely slow start up time of the application. It takes on average about
4.5 seconds for the application to load each time it is run. The only thing
the form is doing is loading an image and placing it in a PictureBox. That's
it-- literally (compiled it's only 37KB, it's a very simple app). The image
is only a 256x256 JPEG.

I've noticed that if Visual Studio 2005 is running at the same time the
start time is only in the 1 second range.

Most of the long start up time is accompanied by disk access (why isn't the
OS caching whatever files are being accessed? I'm literally just running the
application over and over and the long start time doesn't get better).

I'm running Windows 2000 on a P4 2.8Ghz with 1GB of RAM. Does anyone have
any suggestions on making start up time faster??

Thanks, Matt
 
B

Bob Powell [MVP]

Whenever you start a .NET application for the first time the CLR loads and
compiles large chunks of the .NET framework using JIT compile. If VS.NET is
running, those libraries are already in memory so the start up time is
correspondingly reduced.


--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
D

D Witherspoon

I would of thought that these libraries would/should be loaded at PC start
up. Of course it would slow down PC start up time however
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top