C#WPF很慢的应用程序启动 [英] C# WPF Very slow application launch

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

问题描述

我已经写了一个简单的 .NET WPF 应用程序(只包含2的小窗口),但其推出的速度太慢 - 约10-20秒!

I've wrote a simple .net WPF application(contains only 2 small windows), but its launch is too slow - about 10-20 seconds!

探查说:


  • Main-> RunInternal (56%)

  • Main-> RunInternal-> ctor-> LoadBaml (32%)

  • Main->RunInternal(56%)
  • Main->RunInternal->ctor->LoadBaml(32%)

应用加载时间最大的一部分 - 是主要 - > RunInternal 功能,这不是我的功能,我不知道他们是什么让。 可以将其执行时间以某种方式进行优化?

Biggest part of application load time - is body of Main->RunInternal function, this isn't my function and i don't know what they makes. Can their execution time somehow be optimized?

加载BAML标记它需要的所有时间的32%,但我的程序只有3 XAML文件和它们含有少于100行代码。 为什么这个动作需要很长时间

Loading Baml markup it takes 32% of all time, but my program have only 3 XAML files and they are containing less than 100 lines of code. Why does this action take so long?

问我已阅读并尝试了这些技巧,但他们并没有帮助我面前?

Before asking I have read and tried these tricks, but they didn't help me:

  • WPF application slow on startup
  • http://msdn.microsoft.com/en-us/library/cc656914.aspx

所以,我怎么能加快启动时间我的应用程序?

So, how can I speed up the start time of my application?

感谢。

PS。我测试过这两个相似的计算机程序和结果是一样的。

PS. I've tested this program on two similar computers and the result is a same.

推荐答案

看上面的评论中提到的文章。

Look at the article mentioned in the comments above.

我想这是8,(验证码),这取决于什么组件您引用

I would suppose it is 8, (Authenticode), it depends on what assemblies you are referencing

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

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