Sometimes my MVC 4 application starts very slowly, but all the following requests come up quickly. It's running on IIS 8 and it uses Forms authentication. The first start-up might take 20 seconds or so. I'm not 100% sure how long does it take to get a slow start-up again, but I guess it's more than an hour.
It's the same issue as described here: MVC slow if site has been idle
So checking out the Application Pool recycling thing, I stopped the application pool, started it again, then browsed to the address, but it still came up quickly. I then ran the Powershell command (Get-Process -Id ).StartTime on the IIS, and it told me that last recycling for this application pool was when I started it. I suppose that exludes the pool recycling?
The project is using Devexpress MVC layout, and I have removed all the assemblies/references that I don't need, but I didn't notice much difference afterwards.
The other applications on this IIS are made with Web forms, and they always come up quickly. The other applications also don't have the Forms authentication.
As a workaround I'm about to make a service that opens the address every 30 minutes or so, but still would be interested to figure out the real cause.
Any ideas?