如何加快ClickOnce应用程序的启动 [英] Ways to speed up the startup of a ClickOnce application

查看:374
本文介绍了如何加快ClickOnce应用程序的启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Visual &工作室NBSP; 2005 / C# ClickOnce应用程序,获取从 Web服务其所有数据。我已经得到了调整应用程序在那里感觉非常活泼的用户,即使它有去几乎都获取来自Web服务的数据。

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.

不过,启动还是相当低迷。看起来这需要一段时间才能产生第一个Web服务调用。在此之后,它的罚款。

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?

推荐答案

花一些时间来分析您的应用程序加载的程序集。这将会对您的应用程序的加载时间的影响最大。如果您有只偶尔使用的类型,它们移动到另一个组件。的ClickOnce可以优化按需组合件,减少了所需的加载时组件的下载将其加载速度更快。

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.

您还可以有一种存根的发射与加载其他组件动态(的Assembly.Load)并调用它们是加载后的实际处理最低限度装配的依赖关系。

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.

这篇关于如何加快ClickOnce应用程序的启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆