I have a Visual Studio 2005/C# ClickOnce application that gets all its data from a Web service. I've gotten the application tuned where it feels pretty snappy to the users, even though it has to go and fetch data from the Web service for almost everything.
However, the startup is still pretty sluggish. It seems like it takes a while to generate the first web service call. After that, it's fine.
What can I do to speed up the startup of this type of an application? Do I need to generate a serialization assembly?
Spend some time analyzing the assemblies loaded by your application. That's going to have the greatest effect on the load time of your application. If you have types that are only used on occasion, move them to another assembly. ClickOnce can optimize the download of assemblies on demand so reducing the required number of assemblies at load time will make it load faster.
You can also have a sort of "stub" launcher with bare minimum assembly dependencies that loads the other assemblies dynamically (Assembly.Load) and invokes the real processing after they are loaded.
You can use ClickOnce file groups to split your application into manageable pieces and then use the ClickOnce API to download groups when needed. The article ClickOnce File Groups explains how to do this.
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