你是否曾经使用ngen.exe? [英] Have you ever used ngen.exe?

查看:847
本文介绍了你是否曾经使用ngen.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里有人用过NGEN?哪里?为什么?是否有任何性能改进?何时何地是否有意义使用它?

Has anybody here ever used ngen? Where? why? Was there any performance improvement? when and where does it make sense to use it?

推荐答案

是的,我看到的性能改进。我的测量表明,它确实提高启动性能,如果我也把我的程序集到GAC,因为我的组件都强命名。如果你的程序集强名称,NGEN不会做出任何区别不使用GAC。

Yes, I've seen performance improvements. My measurements indicated that it did improve startup performance if I also put my assemblies into the GAC since my assemblies are all strong named. If your assemblies are strong named, NGen won't make any difference without using the GAC.

这不是我的应用程序一个很好的选择,因为我们依靠我们的公司共同的组件(同时也是强大的命名)。常见的组件是由使用许多不同的版本众多产品中,把他们在GAC意味着如果我们的应用程序之一,并没有说使用特定版本的共同的组件之一,它会载入GAC版本不管是什么版本是在其执行的目录中。我们决定,NGEN的好处是不值得的风险。

This wasn't a very good option for my application since we rely on common assemblies from our company (that are also strong named). The common assemblies are used by many products that use many different versions, putting them in the GAC meant that if one of our applications didn't say "use specific version" of one of the common assemblies it would load the GAC version regardless of what version was in its executing directory. We decided that the benefits of NGen weren't worth the risks.

这篇关于你是否曾经使用ngen.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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