I understand that the JIT code is machine specific. Is it possible to create JIT code on the published machine and have IIS use that (instead of the dlls)? The reason I am asking is that every time the app pool restarts, there is a delay in the loading of the application. This delay is due to the fact that the JIT compiled code is getting loaded up into the worker process.
-
Do you know that it's primarily due to JIT compilation? Sure, warmup takes some time, but there are a lot of other things going on when you restart a whole web application, which may easily dwarf the JIT compilation itself.user395760– user3957602012-09-18 18:51:19 +00:00Commented Sep 18, 2012 at 18:51
-
Delnan: I believe its due to JIT compilation, but I am not sure.developer747– developer7472012-09-18 18:53:05 +00:00Commented Sep 18, 2012 at 18:53
1 Answer
ASP.NET is great, except for the loooooooooong application initialisation times - however said times are not just about JIT compilation, there are other delays that are involved, that unfortunately cannot be worked around. You'll find that an ASP.NET application that has not a single *.aspx file (such as a raw IHttpHandler) will still have a long init time.
The only solution is a workaround: get a Scheduled Task (a cron job in *nix terminology) or a third-party web-polling service that sends an innocuous GET request to your website every so-often. IIS also (had) available a pre-warmer extension, but it's gone AWOL for some reason.