Slow page refresh times during development
Asked Answered
M

2

24

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?

Molarity answered 24/7, 2013 at 21:43 Comment(0)
M
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.

Molarity answered 24/7, 2013 at 22:4 Comment(4)
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.Manganin
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?Elma
@CapitánCavernícola I don't really know how to investigate this, but compilation obviously includes a lot of file operations, therefore antivirus activity.Molarity
HOLY MOTHER OF DRAGONS !!! Now I can refresh the page in 5 seconds, not in 5 hours !! THANK YOU !!!Maniple
W
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.

Warlike answered 4/9, 2014 at 3:10 Comment(4)
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.Stallfeed
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.Mandelbaum
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.Mandelbaum
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!Thigh

© 2022 - 2024 — McMap. All rights reserved.