C#WPF很慢启动第一次 [英] C# WPF really slow startup first time

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

问题描述

我谏只创建一个按钮,一个简单的WPF应用程序来检查性能问题..
这是痛苦的缓慢,以体面的机器才开始第一次活动。 我建立一个可执行的发布模式优化,但第一次是约15秒的磁盘IO是在这段时间..它运行的第二个时间更快不到1秒的高...
我认为,这是太多的时间......

I was adviced to just create a simple wpf application with a button to check the performance problems..
It is painfully slow to start only first time event in decent machines. I have built an executable in release mode optimised but first time is about 15 seconds disk IO is high during that time.. The second time it runs is faster less than 1 sec...
I believe that it is too much time...

我添加的文件app1.config

I added a file app1.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <generatePublisherEvidence enabled="false"/>
  </runtime>
</configuration>

APP1心不是应用程序的名称..但没有帮助...

app1 isnt the name of the app.. but didnt help...

任何想法,该怎么办?

推荐答案

在某些机器上,如果你从来没有因为启动应用程序的启动可能是痛苦的运行WPF应用程序。在你的启动文件夹 - 您可以通过运行任何WPF应用程序(只引用一个无需显示窗口),添加一个快速入门。这将确保在dot-NET Framework在满载和你的应用程序应该载入速度更快,虽然这会慢启动了一下。

On some machines if you've never run a WPF app since bootup the application startup can be painful. You could add a "quickstart" by running any WPF app (without needing to display a window -- just reference one) in your startup folder. That will ensure the dot-net framework is fully loaded and your app should load faster, though this will slow bootup a bit.

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

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