Click here to Skip to main content
15,902,635 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: too slow Pin
milleusi20-Sep-06 3:17
milleusi20-Sep-06 3:17 
GeneralRe: too slow Pin
baerten20-Sep-06 5:02
baerten20-Sep-06 5:02 
Question.Net 2.0 and Crystal Reports Pin
j45mw15-Sep-06 11:04
j45mw15-Sep-06 11:04 
Question IE Extension: How to add a button to the status bar? Pin
rryyjw15-Sep-06 6:11
rryyjw15-Sep-06 6:11 
GeneralRe: IE Extension: How to add a button to the status bar? Pin
Guffa15-Sep-06 15:56
Guffa15-Sep-06 15:56 
QuestionReducing time to start application Pin
..Hubert..15-Sep-06 5:34
..Hubert..15-Sep-06 5:34 
AnswerRe: Reducing time to start application Pin
Jakob Farian Krarup17-Sep-06 19:16
Jakob Farian Krarup17-Sep-06 19:16 
GeneralRe: Reducing time to start application Pin
..Hubert..18-Sep-06 1:27
..Hubert..18-Sep-06 1:27 
Hi Jacob
I have tried 3 time measuring methods - user measured time, console output and JetBrains dotTrace.
dotTrace is most detailed, but it has huge influence on measured time.
Your method is probably best since, it has permanent storage of results - thank you for the idea Smile | :)

I have included it in my project and measured times are very similar to those posted before. But I have found something pretty interesting.
There is SplashForm creation in the Program.cs. The SplashForm is derived from NiceDialog class (which is some pre-customized form). Here is part of the log file created with Trace listeners:
2006-09-18 11:44:49; Start of creating splash form
2006-09-18 11:44:52; NiceDialog InitializeComponent start
2006-09-18 11:44:52; NiceDialog InitializeComponent end
2006-09-18 11:44:53; SplashForm InitializeComponent start
2006-09-18 11:44:53; SplashForm InitializeComponent ends

Following code is executed here:
Program.cs
Trace.WriteLine(string.Format("{0}; Start of creating splash form", DateTime.Now));<br />
             SplashForm splash = new SplashForm();<br />
            splash.Show();<br />

NiceDialog.cs
<br />
        public NiceDialogForm()<br />
        {<br />
            Log("NiceDialog InitializeComponent start");<br />
            InitializeComponent();<br />
            Log("NiceDialog InitializeComponent end"); <br />
        }<br />
        protected static void Log(string message)<br />
        {<br />
            Trace.WriteLine(string.Format("{0}; {1}",DateTime.Now, message));<br />
        }<br />

SplashForm.cs
<br />
        public SplashForm()<br />
        {<br />
            Log("SplashForm InitializeComponent start");<br />
            InitializeComponent();<br />
            Log("SplashForm InitializeComponent ends");<br />
            this.lblVersion.Text = "version: "+Application.ProductVersion;<br />
        }<br />


Well - it is strange to me. SplashForm constructor is called but its first method is called 3 seconds later. And it's not the time to load next library - they are all declared in main exe file.
There is picture box with some resource based bitmap on the NiceDialog form. I have heard that resources may make program execution slower, so I decided to reset pictureBox Image propery - so it doesn't show anything right now. Here is part of log file with this operations:
2006-09-18 12:25:45; Start of creating splash form
2006-09-18 12:25:45; NiceDialog InitializeComponent start
2006-09-18 12:25:49; NiceDialog InitializeComponent end
2006-09-18 12:25:49; SplashForm InitializeComponent start
2006-09-18 12:25:49; SplashForm InitializeComponent ends

As you can see, NiceDialog execution time become normal, but NiceDialog InitializeComponent gone much higher (4 seconds!!!)- I have no idea why.


Best regards
Hubert
GeneralRe: Reducing time to start application Pin
Jakob Farian Krarup18-Sep-06 2:02
Jakob Farian Krarup18-Sep-06 2:02 
GeneralRe: Reducing time to start application Pin
..Hubert..18-Sep-06 4:48
..Hubert..18-Sep-06 4:48 
GeneralRe: Reducing time to start application Pin
Jakob Farian Krarup18-Sep-06 5:18
Jakob Farian Krarup18-Sep-06 5:18 
GeneralRe: Reducing time to start application Pin
..Hubert..18-Sep-06 6:09
..Hubert..18-Sep-06 6:09 
GeneralRe: Reducing time to start application Pin
Jakob Farian Krarup18-Sep-06 7:19
Jakob Farian Krarup18-Sep-06 7:19 
GeneralRe: Reducing time to start application Pin
Phil Wilson18-Sep-06 13:20
Phil Wilson18-Sep-06 13:20 
GeneralRe: Reducing time to start application Pin
..Hubert..11-Oct-06 0:39
..Hubert..11-Oct-06 0:39 
QuestionCreate HTMLImage control object Pin
Vipul Mehta14-Sep-06 23:00
Vipul Mehta14-Sep-06 23:00 
QuestionDll Import Problem in loading two c++ assemblies with same name Pin
He is Cool14-Sep-06 18:51
He is Cool14-Sep-06 18:51 
GeneralRe: Dll Import Problem in loading two c++ assemblies with same name Pin
Guffa14-Sep-06 19:15
Guffa14-Sep-06 19:15 
GeneralRe: Dll Import Problem in loading two c++ assemblies with same name Pin
He is Cool14-Sep-06 19:52
He is Cool14-Sep-06 19:52 
AnswerRe: Dll Import Problem in loading two c++ assemblies with same name Pin
Guffa14-Sep-06 22:22
Guffa14-Sep-06 22:22 
Questionevent delegate invokation order Pin
urbane.tiger14-Sep-06 16:14
urbane.tiger14-Sep-06 16:14 
AnswerRe: event delegate invokation order Pin
nitikin15-Sep-06 1:30
nitikin15-Sep-06 1:30 
AnswerRe: event delegate invokation order Pin
urbane.tiger19-Sep-06 15:59
urbane.tiger19-Sep-06 15:59 
QuestionUnInstallation option in .Net Setup Creation Pin
satsumatable13-Sep-06 22:47
satsumatable13-Sep-06 22:47 
AnswerRe: UnInstallation option in .Net Setup Creation Pin
Not Active14-Sep-06 9:44
mentorNot Active14-Sep-06 9:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.