Constant CPU Usage

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Constant CPU Usage

Postby metal450 » June 23rd, 2018, 5:44 am

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).
metal450
 
Posts: 13
Joined: July 9th, 2016, 5:53 am

Re: Constant CPU Usage

Postby maros.beno » June 27th, 2018, 3:07 pm

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!
Maroš Beňo
User avatar
maros.beno
 
Posts: 30
Joined: October 12th, 2016, 12:11 pm

Re: Constant CPU Usage

Postby metal450 » June 27th, 2018, 4:21 pm

Every PHP project, including empty ones I create from scratch.
metal450
 
Posts: 13
Joined: July 9th, 2016, 5:53 am

Re: Constant CPU Usage

Postby maros.beno » June 28th, 2018, 8:23 am

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
Maroš Beňo
User avatar
maros.beno
 
Posts: 30
Joined: October 12th, 2016, 12:11 pm

Re: Constant CPU Usage

Postby metal450 » June 28th, 2018, 8:32 am

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?
metal450
 
Posts: 13
Joined: July 9th, 2016, 5:53 am

Re: Constant CPU Usage

Postby Miloslav Beno » June 29th, 2018, 8:35 am

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!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1203
Joined: January 7th, 2012, 8:36 pm

Re: Constant CPU Usage

Postby metal450 » June 30th, 2018, 2:30 am

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: 13
Joined: July 9th, 2016, 5:53 am

Re: Constant CPU Usage

Postby Miloslav Beno » July 4th, 2018, 8:21 am

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!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1203
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 4 guests

cron

User Control Panel

Login

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 4 guests
Phalanger