如何加快ClickOnce应用程序的启动

编程入门 行业动态 更新时间:2024-10-11 23:20:48
本文介绍了如何加快ClickOnce应用程序的启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

I have a VisualStudio2005/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应用程序的启动

本文发布于:2023-11-07 15:59:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   ClickOnce

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!