Slow startup with IIS Express

前端 未结 8 975
余生分开走
余生分开走 2020-12-28 13:53

I have a problem with my MVC application and startup.

Every time I make a change and one the app its take a long time to start up.

I have about 100 lines wit

8条回答
  •  春和景丽
    2020-12-28 14:14

    I had the same problem with IIS Express 10, Visual Studio 2015 Update 3 on Windows 10. I did a few tests and with different settings and browsers (Chrome 54, Edge 38, Opera 41). The browser doesn't really matter, but I found three things which significantly changed my original 15 seconds load time:

    1. Switched Windows Defender 4.10 off (changed from 15 to 12 seconds)
    2. Turned Edit and Continue feature off (changed from 12 to 6 seconds)
    3. Switched Windows Defender 4.10 back (changed from 6 to 8 seconds)
    4. Tried to run the application without debugging (changed from 8 to 2 seconds)

    So if you are willing to give up Edit and Continue, or even debugging then you can speed up the process.

    Edit and Continue can be turned off in Visual Studio/Tools/Options/Debugging/General/Enable Edit and Continue.

    You can start your project without debugging with Ctrl+F5.

    I would not recommend to turn off your Windows Defender, but you can play around with its exclude directory function, you might win a few seconds there as well.

提交回复
热议问题