开发者

C# WPF really slow startup first time

I was adviced to just create a simple wpf application with a button to check the performance problems..

It is painfully slow 开发者_如何学Cto 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...

I added a file app1.config

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

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

Any idea what to do ??


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.


You may be able to use NGen to speed up the first run of your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜