ngen

NGEN x86 vs x64 with .NET executables

情到浓时终转凉″ 提交于 2020-01-04 19:04:47
问题 I have the following question: My .NET assemblies are compiled in x86 mode. Can I still leverage the performance benefits of NGEN on x64 Windows systems? Will x86 assemblies be compiled into native code on x64? 回答1: Assemblies compiled with x86 will run i wow64 on 64-bits systems, but assemblies copiled with AnyCPU will run natively, regardless of NGEN. Assemblies compiled for x86 can load 32-bit assemblies on 64-bit systems and code compiled for AnyCPU will not load 32-bit dlls. When you use

Any reason why NGEN should hang and never complete for a particular assembly?

穿精又带淫゛_ 提交于 2020-01-04 14:12:49
问题 I have a class library project for .NET 3.5 built with Visual Studio 2008. If I try to NGEN the core assembly in this solution file, NGEN never completes, or at least not in the time I've bothered to let it run (like overnight). Has anyone else experienced this? And if so, did you solve it? And if you did, how? What steps did you take? If this is a bug in NGEN, how do I post this to Microsoft? I have a connect account, but where do I post a bug-report for this particular product, instead of a

Any reason why NGEN should hang and never complete for a particular assembly?

旧街凉风 提交于 2020-01-04 14:12:32
问题 I have a class library project for .NET 3.5 built with Visual Studio 2008. If I try to NGEN the core assembly in this solution file, NGEN never completes, or at least not in the time I've bothered to let it run (like overnight). Has anyone else experienced this? And if so, did you solve it? And if you did, how? What steps did you take? If this is a bug in NGEN, how do I post this to Microsoft? I have a connect account, but where do I post a bug-report for this particular product, instead of a

How is .NET JIT compilation performance (including dynamic methods) affected by image debug options of C# compiler?

落爺英雄遲暮 提交于 2020-01-02 00:41:10
问题 I am trying to optimize my application for for it to perform well right after it is started. At the moment, its distribution contains 304 binaries (including external dependencies) totaling 57 megabytes. It is a WPF application doing mostly database access, without any significant calculations. I discovered that the Debug configuration offers way better (~5 times gain) times for most operations, as they are performed for the first time during the lifetime of the application's process. For

Is it possible to pre-generate NGen images so customers don't have to?

ⅰ亾dé卋堺 提交于 2019-12-23 07:41:02
问题 Our app, distributed via ClickOnce, takes 10.8 seconds on average to start up. After running ngen on the .exe (in the directory that ClickOnce installed it into), it starts up in 6.4 seconds on average. This is obviously a huge speedup ( 40% ) and I would like to make use of ngen-ification if possible. Ron's answer to Is it possible to use NGen with ClickOnce deployment? shows how it can be done on the customer's machine, assuming I guess he runs Windows XP , as it wants Administrator rights

Symbol Resolution on .NET 4.0 NGEN x64 assembly not working

房东的猫 提交于 2019-12-23 03:57:14
问题 My symbol resolution on an x64 NGEN .NET 4.0 assembly it not working. Details: I have a .NET 4.0 command line assembly that I am compiling using Visual Studio with an x64 configuration. After I compile, I run NGEN (The 64 bit version) on it. Having failed with XPERF analysing the callstacks (with -stackwalk profile) which won't resolve my symbols. I am now trying Perfmonitor from here: http://bcl.codeplex.com/releases/view/42784 I have done these steps and would have expected the call stacks

Does it make sense to distribute pre-NGEN-ed assemblies?

守給你的承諾、 提交于 2019-12-21 20:33:18
问题 I've found a few interesting links on using NGEN as a final step in an installer from this post. Is there a reason it is preferred to NGEN your assemblies at setup time, instead of at build time? I'm not particularly concerned with setup time, but it just seems like an unnecessary step that could be automated by my build. 回答1: NGEN output is computer/CPU specific. your build machine will probably not be the production machine (maybe different DotNet version, AMD ? INTEL... who knows..) 来源:

Can NGEN be used with Azure Websites?

三世轮回 提交于 2019-12-21 14:32:00
问题 After much research I still cannot find the answer to this question. So can one NGEN one's ASP.NET MVC3 application which is deployed in Azure Websites, in a 32bit "Basic" or "Standard" instance? Thanks. 回答1: Will things blow up if you NGEN? No. Will you get a benefit from NGEN? No. If your build system differs from the Azure server (which almost certainly does), the runtime will simply re-JIT things on the server. 来源: https://stackoverflow.com/questions/24736839/can-ngen-be-used-with-azure

Validating .NET Framework Assemblies

守給你的承諾、 提交于 2019-12-21 04:34:07
问题 I just went through our german VB.NET forums and there was something interesting that gives me some kind of headache. It is actually possible to edit the .NET Framework assemblies using ReflexIL or some other IL editor. The only thing you have to bypass is the Strong Name signature of the assembly. After changing the assembly IL, you have to run sn.exe -Vr [assemblyname] to kinda skip the strong name validation. After that you have to clear the cached native images. Just go through the C:

Have you ever used ngen.exe?

五迷三道 提交于 2019-12-20 08:56:26
问题 Has anybody here ever used ngen? Where? why? Was there any performance improvement? when and where does it make sense to use it? 回答1: 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. The reason for this is that if you have strong named assemblies that are not in