473,378 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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!

Oct 19 '07 #1
2 2867
"deerchao" <de******@gmail.comwrote in message
news:11*********************@e34g2000pro.googlegro ups.com...
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!

You might try to ngen the assembly.

Willy.

Oct 19 '07 #2
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.bewrote:
"deerchao" <deerc...@gmail.comwrote in message

news:11*********************@e34g2000pro.googlegro ups.com...
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!

You might try to ngen the assembly.

Willy.

Oct 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
13
by: David Mitchell | last post by:
I use the above function in queries for a number of forms and reports. The reports take approx 20 seconds to open. There are only 100 product id's in tblProducts. My concern is that the time will...
5
by: Joe Reazor | last post by:
I've got an asp.net page that has approximately 1,440 controls on it. You must think I'm crazy, but we need to have the page organized in this fashion. As you can imagine, the page takes a very...
4
by: Scott Johnson | last post by:
Hi! Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms? Some of these forms have tab strips with...
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
102
by: tom fredriksen | last post by:
Hi I was doing a simple test of the speed of a "maths" operation and when I tested it I found that removing the loop that initialises the data array for the operation caused the whole program to...
8
by: mast2as | last post by:
I am sure this topic has been discussed a thousand times and I read a few things about it today on the net. I also want to say I am trying to start a polemic here, I am just curious and willint to...
10
by: nagar | last post by:
I noticed this behavior in a C# application. For its nature the applications stays mainly minimized to the tray icons As soon as it's launched the application responds normally. After a while,...
0
by: MattGaff | last post by:
I have a Web server running Reporting Services which has (all of a sudden) dropped in performance. When a user logs in, they are presented with an initial report (Main Menu) which provides links to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.