Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Where does .NET store its data?

$
0
0

[Newbie alert]

I am developing my 1st. .NET application, myApp.exe which was having an awful performance. After learning about .NET profilers, I narrowed down the problem to a long-running function, part of the OpenXML SDK. The diagnosis was that about 90% of the time was being wasted on "JIT overhead".

My next interesting discovery was NGEN which (I assumed) would compile the myApp.exe executable and replace it with speedier version. Much to my surprise (I checked the MD5sum before and after: they are identical) NGEN absconded with the "compiled" version of my app, and that of a critical component:DocumentFormat.OpenXML.

Here's the remarkable result:

Being curious by nature, I checked under the (newly discovered) directory \Windows\Microsoft.NET and found out that the only evidence of NGEN's handy work was a ngen.log file.

I also discovered that any identical copy (in the MD5sum sense) of the executable will execute very fast, but if I rebuild the executable (with identical source files) it will not be "recognized" and will perform very slowly again: such is the nature of NGEN's blessing.

Could a kind expert clarify what is going on behind the curtains?

TIA,

-Travis


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>