Constant CPU Usage
16 posts
• Page 1 of 2 • 1, 2
Constant CPU Usage
Whenever I have a PHP project open in Visual Studio, devenv.exe keeps the CPU pegged at ~25% (my system is quadcore). This doesn't happen with any other type of project (i.e. C++, C#, etc). I've seen several other threads on here with similar issues, i.e.:
viewtopic.php?f=21&t=1448&p=6888&hilit=cpu+usage#p6888
viewtopic.php?f=21&t=1740&p=7865&hilit=cpu+usage#p7865
Is there a way to avoid this? I'm not sure what it's constantly working so hard to do, but it makes development extremely difficult (not to mention the laptop heats up, not to mention running off a battery becomes impossible).
viewtopic.php?f=21&t=1448&p=6888&hilit=cpu+usage#p6888
viewtopic.php?f=21&t=1740&p=7865&hilit=cpu+usage#p7865
Is there a way to avoid this? I'm not sure what it's constantly working so hard to do, but it makes development extremely difficult (not to mention the laptop heats up, not to mention running off a battery becomes impossible).
- metal450
- Posts: 23
- Joined: July 9th, 2016, 5:53 am
Re: Constant CPU Usage
Hi,
sorry to hear you have such problems. Does this happen to you only in one particular PHP project, or in every PHP project, even the empty ones just created? If it's only one particular project, could you send it to us for analysis? It's sufficient to remove everything to the point that it's still happening, so we can reproduce it.
Thanks for the answer, have a nice day!
sorry to hear you have such problems. Does this happen to you only in one particular PHP project, or in every PHP project, even the empty ones just created? If it's only one particular project, could you send it to us for analysis? It's sufficient to remove everything to the point that it's still happening, so we can reproduce it.
Thanks for the answer, have a nice day!
Maroš Beňo
-
maros.beno - Posts: 62
- Joined: October 12th, 2016, 12:11 pm
Re: Constant CPU Usage
Every PHP project, including empty ones I create from scratch.
- metal450
- Posts: 23
- Joined: July 9th, 2016, 5:53 am
Re: Constant CPU Usage
Which version of PHP Tools and Visual Studio do you have? Also, could you send us Visual Studio ActivityLog please?
Thanks, have a nice day.
EDIT: https://docs.devsense.com/troubleshooti ... itylog-xml
Thanks, have a nice day.
EDIT: https://docs.devsense.com/troubleshooti ... itylog-xml
Maroš Beňo
-
maros.beno - Posts: 62
- Joined: October 12th, 2016, 12:11 pm
Re: Constant CPU Usage
PHP.VS.1.28.10848.2017
Visual Studio 15.5.3
To send you an ActivityLog, I should devenv.exe /log, then just quit VS & send you the log? Or I need to create a new php project, etc?
Visual Studio 15.5.3
To send you an ActivityLog, I should devenv.exe /log, then just quit VS & send you the log? Or I need to create a new php project, etc?
- metal450
- Posts: 23
- Joined: July 9th, 2016, 5:53 am
Re: Constant CPU Usage
Hello,
Yes, you will start the VS wtih log parameter (see https://docs.devsense.com/troubleshooting/activitylog-xml) and then open the project that caused the issue. After that the log should have some useful info which we can analyse.
Thanks!
Yes, you will start the VS wtih log parameter (see https://docs.devsense.com/troubleshooting/activitylog-xml) and then open the project that caused the issue. After that the log should have some useful info which we can analyse.
Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Constant CPU Usage
While starting to skim through the log & playing with VS a bit, I figured out what's causing this: it appears PHP Tools doesn't like that I have devenv.exe firewalled. My firewall blocks it from talking to anyone except localhost, LAN, & a few specific remote servers (i.e. to block Microsoft's telemetry or any other kind of phone-home stuff I'm not interested in having). As soon as I disabled the firewall, the CPU usage dropped...& now even when I re-enable it, for the moment usage remains normal. So the plus side is it's fixed (for the moment), the minus side is I can on longer reproduce it (for the moment). However, maybe based on this you can figure out what's going on. Is PHP Tools trying to do some sort of 'phone home' or other network activity, which may be looping/repeating if VS does have an internet connection, but just can't reach some specific server? That's my best guess.
- metal450
- Posts: 23
- Joined: July 9th, 2016, 5:53 am
Re: Constant CPU Usage
Hello,
Thank you for great observations. With this information we will try to reproduce this. There might be some telemetry thing or license check or if it's not us, it can be something else because of us. Let us check that and get back to you as soon as we know more.
Thanks!
Thank you for great observations. With this information we will try to reproduce this. There might be some telemetry thing or license check or if it's not us, it can be something else because of us. Let us check that and get back to you as soon as we know more.
Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Constant CPU Usage
Are we near a solution on this? I have to keep disabling my firewall anytime I develop in PHP (which is obviously not the best idea) - and sometimes when I forget to turn it off, I end up slurping through half a battery before I notice/remember.
- metal450
- Posts: 23
- Joined: July 9th, 2016, 5:53 am
Re: Constant CPU Usage
Hi, I managed to reproduce your problem. But it was without any PHP Tools installed. Visual Studio just does not like to be offline I guess. When i was offline and turned on Visual Studio, CPU usage was about 80%, but when i enabled internet connection for a while, CPU usage dropped and then I could be offline again without much CPU usage. I don't think there's a way around it now, because it's Visual Studio itself doing this.
Maroš Beňo
-
maros.beno - Posts: 62
- Joined: October 12th, 2016, 12:11 pm
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 49 guests