views:

78

answers:

2

Hi All ,

I have one doubt here , I have one asp.net MVC web application and every night we are recylcing the applciation pool from IIS. Now when the next day first request comes it is taking time to get response.

First request it is taking time because app domain is not loaded (application is not started) to start web application it takes some time.

Now the question is does the just in time compiler will come here again ? Means every morning it needs to recompiled by JIT again ?

+2  A: 

Yes, the application will be compiled from IL to executable code again after the recycle: Throwing away the appdomain will also loose the JITed native images.

You could, for instance, avoid some of the compilation by putting dependent assemblies that don't change often in the GAC, and use NGEN on them. That could possible speed up things a bit.

Sebastian P.R. Gingter
You could add a line in the scheduled job that recycles the app pool that hits the app and therefore causes the app to be JITed.
Christopher Edwards
+2  A: 

JITting will normally not have a huge performance hit. Cold startup of the IIS process, starting your AppDomain and loading your assemblies from disk will probably have much higher impact. Also, your application might have some custom startup logic in the global.asax file (reading stuff from db). And don't forget your database might have to wake up as well.

Steven