23

We have a reasonably large ASP.NET MVC app that I work on in Visual Studio 2012 on Win 8. I have a strange issue with slow page load times after recompilation. Usually, the actual build time is about 5 seconds, then the browser opens up and it takes 1-2 minutes to load the page.

Some points:

  • It loads slowly whether I change a view or recompile the project completely
  • This is not a performance issue, everything else works really well, there is enough RAM etc.
  • It happens only with IIS Express. When I switch to the default development server, it works fine.
  • All the other devs in my team use IIS Express, but they do not have this problem.
  • I tried to re-install IIS and to use v7.5 instead of v8 and recreated all config files. No luck.
  • I tried to disable all extensions, obviously it didn't affect load times too.
  • There is nothing abnormal in Task Manager
  • It's a virtual machine on my Macbook Pro, but again – this is not a performance problem.

What else can I try?

2 Answers 2

22

Solved by turning off Windows Defender Service. Everything is a hundred times faster now.

UPDATE: I failed to find a reason why Windows Defender is using lots of CPU power pretty much all the time. I tried to google it and it turns out that many people have a similar problem on Win 8 with no good solution.

If you really want to leave Defender on, you can add the project folder path as an exception, but it still will be slow-ish.

Hope it helps someone.

UPDATE 2: The above still holds true in Windows 10. Especially if you're running it in a virtual machine (I run it in Parallels on Mac). The overall speed increase, not only page refresh times, is very noticeable.

UPDATE 3: Apparently Windows Defender has a habit of silently turning itself back on again. So, be wary of that.

4
  • 1
    HOLY SHNIKES you weren't kidding!! I wasn't seeing so much of a CPU load from Windows Defender, but disabling the Real Time Protection piece of it sped the launch of a VS2013 MVC5 project from ~ 10-15 mins to under 20 seconds. Thank you thank you thank you.
    – Gojira
    Apr 11, 2014 at 14:35
  • 1
    I always fight with my IT administrators to mantain my develop machine far from tentacles of Antivirus, Windows Defender, and the other CPU vampires. Maybe temp files genertated make them going insane, what who can expend time investigating that? Aug 28, 2015 at 11:48
  • @CapitánCavernícola I don't really know how to investigate this, but compilation obviously includes a lot of file operations, therefore antivirus activity. Aug 28, 2015 at 11:55
  • 1
    HOLY MOTHER OF DRAGONS !!! Now I can refresh the page in 5 seconds, not in 5 hours !! THANK YOU !!! Jul 11, 2017 at 13:11
13

After viewing this question and answer above I found that Windows Defender Service was already turned off for me, however, I was running AVG. I disabled AVG and sure enough the lag went completely away!

So if Windows Defender Service is turned off for you and you are running some sort of system protection like AV try disabling that.

4
  • 2
    Thank you! For me it was Malwarebytes Anti-Malware, but same idea. Disabling it sped up my page refreshes (for dev sites from Visual Studio/IIS Express) from several minutes to a couple seconds.
    – TheRotag
    Sep 14, 2014 at 20:09
  • In my case it was "Endpoint Protection", stopping the service did the trick! Thank a lot guys, for finding it out. It drove me crazy for couple of days.
    – Rajiv
    Jun 10, 2015 at 14:39
  • Sorry, false alarm. It me it was one time fast result for whatever reason. It is back to its original slowness. Stopping "Endpoint Protection" related services didn't help. I don't have any other protection service running.
    – Rajiv
    Jun 10, 2015 at 16:38
  • AVG for me as well. It was a nightmare while I was having Web Protection active. Every second build it was taking 30secs to see the page for the first time. Disable it guys!
    – objecto
    Aug 24, 2015 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.