As .net matures, the JIT capabilities have been improved to be brilliantly lazy. That is, don't produce machine code if it isn't needed. In general, this is a good thing.
However, if I am trying to warmup an application I may prefer an aggressive JIT stance. Is there a way to configure a .net application so that all methods of a class are JIT compiled, simply because -the class was constructed?
If yes, my favorite object-creational pattern could instantiate my appliation's object-graph, and I would have everything JIT-ready simultaneously. That would be nice.
Can this be done?
As a side note - you could use NGen.exe to produce native image of your dll's at deployment time (NB:It's not a perfect solution - as it has some drawbacks - check out the documentation carefully)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With