How to speed up startup time the first page (login page)?

0 like 0 dislike
5 views
Good day!

When you first enter the website ASP MVC page takes too long to load (about 5-7 seconds).
How can I speed up the load time?
As far as I know the case can be associated with different keshirovaniya and ApplicationPool, but I couldn't figure out what to do to speed up the launch.

Who faced with similar problems, tell me what can I do?
by | 5 views

2 Answers

0 like 0 dislike
If the delay of 5-7 seconds, it is likely that this is due to stop ApplicationPool. In the absence of requests for some time (default 20 minutes), IIS stops the process that serves up the pool site. Accordingly, if the request arrives and the pool is stopped, IIS-u need to start the process, to raise all modules for a site, the site itself to load and run, and only after all this site is ready to process requests. Hence, such a significant delay on the first request, all subsequent requests will be processed quickly.
To change this behavior in IIS Manager, select the pool, then Advanced Settings and there are two options: the "Idle Time-out" and "Idle Time-out Action". The latter is responsible for action after timeout, by default, it should Terminate, i.e. abort the process, you can change on suspend (suspend but not to kill the process). Also there is a option "Start Mode", and there is the default OnDemand (on request), can be changed to AlwaysRunning (i.e. always running).
But it is worth considering that a continuously running process AP-the pool will consume a lot of memory and some CPU time, and if the application is rarely used, basically in idle to consume server resources.
by
0 like 0 dislike
Of the simplest may be advisable to use a precompile during publishing and/or feature auto-start in IIS. Usually this is enough.
by
110,608 questions
257,186 answers
0 comments
33,865 users