What makes WPF application startup slow?

前端 未结 5 1683
醉酒成梦
醉酒成梦 2020-12-08 05:21

I noticed that WPF application startup is sometimes pretty slow. Does anybody know if the the cause is the elements initialization or DLLs loading or something else?

5条回答
  •  我在风中等你
    2020-12-08 06:18

    The most useful advice on fixing WPF startup performance I've ever seen was given in this other question: run "ngen update" in every framework folder.

    It seems that Microsoft can't keep their ngen cache up-to-date, which results in your application pretty much recompiling half the .NET framework every single startup.

    Hard to believe, but seems to be true.

提交回复
热议问题