Questions tagged [ngen]

The Native Image Generator (Ngen.exe) is a tool for the .NET framework that improves the performance of managed applications by creating and caching processor-specific machine code, so that just-in-time compilation is no longer necessary.

From Native Image Generator (Ngen.exe) on MSDN:

The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead using the just-in-time (JIT) compiler to compile the original assembly.

158 questions
14
votes
1 answer

Is there any way to change the .NET JIT compiler to favor performance over compile time?

I was wondering if there's any way to change the behavior of the .NET JIT compiler, by specifying a preference for more in-depth optimizations. Failing that, it would be nice if it could do some kind of profile-guided optimization, if it doesn't…
Oliver Mellet
  • 2,359
  • 12
  • 9
12
votes
2 answers

Can we disassemble (using ILDasm) an NGen-ed assembly?

If I NGen an assembly, is it normal that ildasm still disassembles it? Ok. I wrote a HelloWorld class library and the ensuing dll is named NGenILDasmTest.dll. --> Targeted for the .Net fw 4. From Vs 2010 command prompt, I did gacutil -i…
gmaran23
  • 1,898
  • 2
  • 15
  • 18
12
votes
3 answers

Determine if GAC'ed & NGen'ed assemblies are being used

How do I determine if the Native images are being used without the Loader verifing the signature of the assembly at runtime, or even using the GAC'ed assembly? I have complex system that we're experimenting with NGen but currently we're running the…
Dog Ears
  • 8,677
  • 5
  • 34
  • 51
11
votes
5 answers

How do I run nGen at the end of the installation (MSI)?

I would like to execute nGen at the end of my installation simply to improve the perceived performance of the first startup of my application. How could I do that? Is there are some best practices? Can I be sure that nGen is always installed with…
Martin
  • 35,202
  • 58
  • 178
  • 268
11
votes
0 answers

What is the difference between Dalvik VM and ART Runtime?

Dalvik VM has been the default VM since first Android versions. Google released the new ART runtime in KitKat 4.4. AndroidPolice says it would increase app performance and battery life. Unfortunately, there's almost no technical information about…
Ostap Andrusiv
  • 4,488
  • 1
  • 33
  • 36
10
votes
1 answer

.NET native images created with NGEN are not loaded

I have used NGEN to create native images of several assemblies used by my application. However, those images are not loaded when running the application and I have no idea why. This is a typical log from fuslogvw: *** Assembly Binder Log Entry …
Odsh
  • 655
  • 5
  • 19
9
votes
2 answers

How to get the PDB file for mscorlib.ni.lib (.Net Framework 3.5)

After doing a lot of search, I still couldn't get the solution for the question. I have a mdmp file. The call stack shows it is using mscorlib.ni.dll. So to get the function information, I need to get its pdb file. The version of mscorlib.ni.dll is…
Buzz
  • 1,389
  • 2
  • 15
  • 29
9
votes
1 answer

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

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…
Evgeniy Berezovsky
  • 16,237
  • 8
  • 74
  • 131
8
votes
1 answer

How to resolve BROKEN stacks in PerfView for 64 bit process on Windows Server 2012 R2

I'm running perfview (just default collection) on a production system where the CPU is spiking to 100% for a couple of minutes strait. I get some useful results however i also get a bunch of BROKEN stacks. The machine is Windows Server 2012 R2. The…
Mark
  • 4,641
  • 11
  • 46
  • 78
8
votes
0 answers

Cannot load symbols created with Ngen for Native Image DLLs

I am investigating a crashing program but cannot load symbols for native image DLLs in Visual Studio 2013. The application is 32-bit and uses .NET 4.0.30319. I confirmed this by checking what version of clr.dll is loaded into process from the…
krtzer
  • 103
  • 7
8
votes
2 answers

Where can I download the latest ngen.exe?

I am using ngen.exe (the .Net Native Image Generator) version 2.0.50727.312. Is this the latest version? If not, where can I download the latest version? This page on msdn does not appear to have a link to a download. If it matters, I need ngen.exe…
Walt D
  • 3,512
  • 4
  • 27
  • 39
8
votes
4 answers

Bundle .NET dlls to run application in .NET-less machine?

AFAIK, ngen turns MSIL into native code (also reffered to as pre-JIT), however I never payed too much attention at it's startup performance impact. Ngen'd applications still require the .NET base class libraries (the runtime). Since the base class…
Camilo Martin
  • 34,128
  • 20
  • 104
  • 150
8
votes
5 answers

How to debug a WER minidump of an "ngen"ed image

When ngen is executed on a .NET managed application at installation time, and a crash dump is retrieved from Windows Error Reporting for the app, how can you use it to see a stack trace, variables, etc.? Here's some background related to the…
Edward Brey
  • 35,877
  • 14
  • 173
  • 224
7
votes
3 answers

Need help getting NGen back into working condition

NGen is unhappy on my computer, and i can't find a way to get a deep understanding of what is going wrong. After every startup, ngen logs this message: .NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Service reached limit…
Leon Bambrick
  • 24,569
  • 9
  • 48
  • 74
7
votes
0 answers

Is it possible to NGen dlls for use in Azure Websites?

We are currently using MVC3, .NET4.5, EF6.1, MSSQL2008(dev), SQL Azure(Test and Live). Our application is quite complicated and we are encountering significant warm up lags, around 30 secs, after an application pool refresh. We use External autoping…
SamJolly
  • 5,945
  • 10
  • 51
  • 105
1
2
3
10 11