I use C# to write windows applications with the .NET framework. How can I decrease startup time for these applications? My applications feel very slow during startup and initialization, particularly when showing the initial form.
My application works with an Access (MDB) database to save data. In some forms it loads data, but the first time the application shows any given form, it takes a long time to display.
I've tried using NGen to decrease the startup time, but it did not help me as expected.
Make sure your application does as little work as possible on startup.
You can change your startup code to defer startup tasks to a secondary thread.
I'd give a more detailed answer, but your question is very broad and not detailed enough.
First you need to diagnose what functions are running during this startup period, and analyze how much of the startup delay each of the functions is consuming...
Then once you know that, if one or two of them are consuming the bulk of the time, and do not involve the initially displayed UI screens, execute those functions on a separate thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With