x86 版本启动速度比 x64/Any CPU 快 [英] x86 version starts faster than x64/Any CPU

查看:116
本文介绍了x86 版本启动速度比 x64/Any CPU 快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前段时间我注意到我的应用程序的发布版本比调试版本慢 2 倍(发布为 10-12 秒,调试为 4-5 秒).那是因为我将平台目标设置为 Any CPU 用于发布版本和 x86 用于调试版本.当我将发布配置更改为 x86 时,两个版本都需要同时启动.

Some time ago I noticed that my release version of my application starts 2 times slower than the debug version (10-12 seconds for release and 4-5 for debug). That was because I set platform target to Any CPU for release build and x86 for Debug build. When I change release configuration to x86 then both versions need the same time to start.

我不明白为什么将平台设置为 Any CPU 或 x64 会降低应用程序启动速度.

I don't understand why setting platform to Any CPU or x64 so much slows application startup.

在我的应用程序中,我使用了以下库:

In my application I am using following libraries:

  • EF6
  • Log4Net
  • 福迪
  • Autofac
  • DevExpress WPF 控件

也许使用过的库之一会减慢我的应用程序启动速度?

Maybe one of used libraries slows my application startup?

推荐答案

.NET 目前(4.6 之前)针对 x86 和 x64 平台有不同的 JIT 引擎,它们有不同的启动时间.在 4.6 中,引擎将更加相似,启动时间应该更少不同.

.NET has currently (pre-4.6) different JIT engines for x86 and x64 platforms and they have different startup times. In 4.6 the engines will be more similar and the startup time should be less different.

如果这是原因,您已经可以使用 4.6 预版本进行测试.

You can already test with 4.6 pre-version if this is the cause.

https://stackoverflow.com/a/29595194/1806780

这篇关于x86 版本启动速度比 x64/Any CPU 快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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