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.

160 questions
0
votes
1 answer

NGen ASP.NET to save memory - Native Image not used

We have a web application which we host, where we deploy the same application to 100+ "tenants" on the same machine(s). Managed DLL's memory is not shared between processes by default, that means we load the same DLL 100+ times into memory. Goal is…
MichelZ
  • 4,214
  • 5
  • 30
  • 35
0
votes
2 answers

Why JIT if we have NGEN

Why do CLR need JIT compiler to complie IL to machine code when it has NGEN that does that work at the time of installation. One more question, how JIT will complie IL code if it is already NGENed?
Imad
  • 7,126
  • 12
  • 55
  • 112
0
votes
0 answers

What are the NGEN artifacts and where are they located?

I have a Desktop app that is distributed via a NSIS installer. During the install it runs NGEN on the host machine. Recently I got some bugs where I see a System.MissingMethodException, which I suspect is somehow related to the NGEN. I would like to…
Pinco Pallino
  • 916
  • 1
  • 6
  • 18
0
votes
0 answers

How can i make grid control first time load faster using ngen

i have a grid control in my C# application which loads slow for the time. takes up to 17 second after that starts to in a 1sec, the table has only 800 records. so i tried to use ngen by adding %WINDIR%\Microsoft.Net\Framework\v4.0.30319\ngen.exe…
Joe
  • 101
  • 2
  • 14
0
votes
0 answers

Is there a way to artificially bloat JIT code?

Is there a way to create large JIT code from a small assembly to increase startup time of an application spent in jittering? We are testing various methods of optimizing start-up performance (cold/warm start) and one is using Multicore JIT…
Samuel
  • 6,126
  • 35
  • 70
0
votes
1 answer

Using NGen with Wix Toolset for AddIn Express Excel Addin

I would like to improve the first-run performance of a .NET Excel Addin developed using AddIn Express. The reason the addin runs slowly during the first execution of various tasks is because the JIT spends time converting MSIL into native executable…
tjsmith
  • 729
  • 7
  • 21
0
votes
0 answers

Missing references with Ngen.exe

I'm trying to compile a .Net / C# 4.6 application with Ngen.exe. My application is build as 64bits, so i use the x64 ngen.exe. I have a lot of these errors : Warning: System.IO.FileLoadException: Impossible de charger le fichier ou l'assembly…
Walter Fabio Simoni
  • 5,671
  • 15
  • 55
  • 80
0
votes
0 answers

How do I know if I m loading from the Native Image Cache after compiling with NGEN?

I used NGEN to create a Native Image. My understanding is that is it stored in the Native Image Cache (NIC). When I load my program, I would like to know if it s properly loaded from the NIC and not using the JIT compiler. How can I know if I m…
Fred
  • 677
  • 2
  • 7
  • 21
0
votes
1 answer

Is it possible to "ngen" an executable on a network drive?

The title speaks for itself. To clarify things: so far I've used Ngen in an installer to compile the .exe with all dependencies which gave us a huge speedup, be it at startup or at runtime (at least it feels like so). But now I wanted to create an…
EaranMaleasi
  • 895
  • 1
  • 13
  • 32
0
votes
1 answer

CMD-Script stops execution after one second

I'm trying to call ngen with a CMD-script to create a native image of the application that is installed with InnoSetup. For that I run said script by calling ShellExec in the curStepChanged function when Curstep is ssPostInstall. The script itself…
EaranMaleasi
  • 895
  • 1
  • 13
  • 32
0
votes
1 answer

Is there a way to clean up assemblies that I have ngen'd in mass

I have added a whole bunch of assemblies to test something. I added them 1 assembly at a time. I need to clean up the assemblies that I added and I am wondering if there is a way to do that in mass. The only way that I know of is to do "ngen…
user299967
  • 119
  • 2
  • 12
0
votes
0 answers

How can I check if NGEN service is running?

I need to use NGEN to precompile my CLR assemblies. I use the queue option to make that the request are processed by the "Native image service". I need to ensure that the service is running, otherwise I will execute the optimization synchronously. I…
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
0
votes
0 answers

assembly still JIT after being ngened

I have ngened an assembly (an exe with dependant dlls) and it runs fine. But when the computer is restarted and the application is run first time it runs in JIT mode and in subsequent runs it runs in ngened mode. Also when I tried to ngen the…
jeff
  • 684
  • 1
  • 11
  • 30
0
votes
1 answer

Ngen provides an optimized runtime performance, or not?

I developed a WinForms application that needs to be working 24 hrs, startup time is slow but that does not matters 'cause possibly only could be ran 1 or 2 times per day with very long periods of execution duration then I'm interested into…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
0
votes
1 answer

Msi generated via Wix, Reporting ngen progress

I'm running ngen which I've included in my Wvx files that generates the msi. however, running the installer in logging mode does not feed back if ngen had executed. Is there any way to confirm that an msi installed has ngened stuff?
Qash
  • 167
  • 1
  • 12
1 2 3
10
11