Click here to Skip to main content
16,022,418 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I have windows form with Autodesk Design Review component inside it.

When this form is launched from other form with method form.Show() form launches in about 1s.

When I launch same form with process.Start, form is shown in about 6 seconds.

Maybe someone has any suggestion on how to achive same result (of 1s) with process.Start()?
Posted
Updated 16-Nov-11 4:11am
v2
Comments
Mehdi Gholam 16-Nov-11 10:56am    
Have tried investing in a SSD drive.

Obviously, you are doing lots of things when starting a process other than just creating the form you want. In order to reduce the time that takes, have a look at what your process is doing on startup. The unavoidable overhead of loading a new process and the .Net Framework is minimal (certainly not more than one second) if the Framework is already in memory, as it should be, so there is at least four seconds' worth of stuff being done in addition to this form being created.

If there are heavy components that can be late-loaded (i.e. in a Form.Load event or separate thread that is spawned after the main form is loaded), look into that. It will increase the complexity of your solution, of course, so it is a tradeoff, and it will still take 6 seconds until the full functionality is available (anything that needs those components can't work until they're there). But it can help in getting something displayed to the user faster.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Nov-11 14:22pm    
Nice advice, a 5.
--SA
You are trying to compare apples and oranges. Process.Start requires the OS to setup and configure a new process and start the application, this takes time. With Form.Show the process has already been started and the application is running.
 
Share this answer
 
v2
Comments
Uday P.Singh 16-Nov-11 10:33am    
5ed

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900