Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

InitializeComponent takes 3 seconds, can I do anything to speed it up?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deerchao - 19 Oct 2007 11:48 GMT
Hi, I have a MainForm with Lots of Menu Items in a MenuStrip control,
several items in a StatusStrip, and a DockPanel from DockPanel Suite.
The problem is it takes 3 seconds long to execute the
InitializeComponent() mehtod generated by Visual Studio on Windows XP
in a "cold start" - the first time starting a .net application after
boot. And I have other codes to run at startup, so the total time adds
to about 7 seconds, which should not be considered as accectable.

I can optimize my own code, but is there any way to reduce the time
InitializeComponent() costs?

Thanks!
Willy Denoyette [MVP] - 19 Oct 2007 12:35 GMT
> Hi, I have a MainForm with Lots of Menu Items in a MenuStrip control,
> several items in a StatusStrip, and a DockPanel from DockPanel Suite.
[quoted text clipped - 8 lines]
>
> Thanks!

You might try to ngen the assembly.

Willy.
deerchao - 19 Oct 2007 12:50 GMT
Thanks, if I do ngen, then I have to strong name my assemblies, and
put them into GAC, right?
Do I still have a chance to easily upgrade them?

My application have a light weight upgrade feature, it simplely
compares the version info of local dlls/exe file to the info it gets
from network, then it download the new ones to replace the old ones.
Using ngen, is there any easy way to upgrade? I release my application
very offen, in about every 3 days.

Thanks again!

On Oct 19, 7:35 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.be> wrote:

> > Hi, I have a MainForm with Lots of Menu Items in a MenuStrip control,
> > several items in a StatusStrip, and a DockPanel from DockPanel Suite.
[quoted text clipped - 12 lines]
>
> Willy.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.