ide-php icon indicating copy to clipboard operation
ide-php copied to clipboard

CPU load

Open KilianMahe opened this issue 6 years ago • 17 comments

I see a constant CPU usage when this package is enabled. 25% by the PHP binary and 25% by Atom (change often). Even when I don't do anything. See screenshot. process process2

My project is in Drupal 8 Atom 1.24.0 atom-ide-ui 0.9.1 ide-php 0.7.7.7 php 7.1.14 Windows 7

KilianMahe avatar Feb 27 '18 13:02 KilianMahe

Do you have this issue with any project? If I just open a project with a few small test PHP files on Windows 10, I don't see similar behavior but if I try https://github.com/drupal/drupal for example, the CPU usage spikes around ~60-70%.

Maybe the same or similar to https://github.com/atom/ide-php/issues/104?

rsese avatar Mar 01 '18 06:03 rsese

I tested with another very simple PHP project and I don't see any particular load. So probably linked to the complexity of a Drupal project. Any tips ?

KilianMahe avatar Mar 01 '18 09:03 KilianMahe

My php project is rather small (maybe 30 php files in the whole project, only 4 or 5 open, none of the open ones longer than 150 lines), but I also experienced this issue. Had to disable this, because it got really loud... :headphones:

Moini avatar Mar 10 '18 16:03 Moini

Same here, this problem occurs when at least one file is actively open.

ventikus avatar Apr 23 '18 20:04 ventikus

+1 it overloads my Mac system as well.

ynot729 avatar May 08 '18 11:05 ynot729

same in linux with 1.27: sh -c '/usr/bin/php7.2' '-c' '/tmp/BANRFv' 'felixfbecker/language-server/bin/php-language-server.php' '--memory-limit=2G' at 100%

ciscon avatar May 18 '18 16:05 ciscon

Just like @ciscon I have atom 1.27 in linux and a large collection of php files, the package take one of my cores 100% and after 14 hours and counting it's still do it. I have a Lenovo Y50-70 with and ssd so I think it's not a machine problem.

german-rios-gonzalez avatar Jun 06 '18 20:06 german-rios-gonzalez

this would be acceptable if the results were cached in some way, but it happens every start which means that for now i have to completely disable this package.

ciscon avatar Jun 08 '18 18:06 ciscon

Is there any progress being made on this?

felipevolpatto avatar Jun 12 '18 14:06 felipevolpatto

Unfortunately this is outside the control of ide-php as it is the upstream language server.

damieng avatar Jun 12 '18 14:06 damieng

Running into the same issue. Noticed a dozen php processes running at 25-60% of CPU after leaving open for multiple days. Computer started bogging down and fan was running hot. I only installed this a few days ago. Quit and restarted Atom and single php process running at 100%. MacBook Pro 10.13.6, Atom 1.31.2.

Re: @damieng's comment about it being the language server: https://github.com/felixfbecker/php-language-server/issues/465

webbower avatar Oct 19 '18 22:10 webbower

I notice that if I have one project open and one PHP file open, my Mac's fans start running hard and I see a php process running at 99% CPU. Sometimes the same process is also using nearly 1 GB of memory. I have many of the IDE's features disabled. I mainly want the method/property name outline in the sidebar so I am not sure why so much CPU/memory is being used.

benjaminkohl avatar Mar 29 '19 14:03 benjaminkohl

For me, it was the ide-php extension. When I disabled it, the problem went away.

ihafkenschiel avatar Apr 25 '19 02:04 ihafkenschiel

Same for me with magento2 projects, the ide-php package is eating my cpu. I can solve it adding only specific folders to my workspace like app and vendor. I think that monitoring all the changes in big projects is causing the problem.

jwohlfeil avatar May 16 '19 06:05 jwohlfeil

I suspect that this will never be fixed since Facebook retired Nuclide/Atom IDE. Might be time to figure out alternatives for PHP in Atom. https://nuclide.io

webbower avatar Jul 31 '19 18:07 webbower

For what it's worth, I primarily used the PHP IDE just to have the list of properties/classes in the right panel, so it was a bit overkill for my purposes anyway. I stopped using the IDE and just use the Symbols List package now which doesn't cause CPU or memory spikes.

Symbols List package

benjaminkohl avatar Jul 31 '19 19:07 benjaminkohl

I suspect that this will never be fixed since Facebook retired Nuclide/Atom IDE. Might be time to figure out alternatives for PHP in Atom. https://nuclide.io

This issue is not to do with ide-php so much as it is the upstream PHP server that is runs to evaluate PHP. See: https://github.com/felixfbecker/php-language-server/issues/465

I think the ideal situation would be to give the option to run a different php (like native OS's PHP ? or a mapped container path)

They are looking for PR's on that project. :^D Maybe we circle the wagons and get this resolved. It is affecting other projects that depend on it as well, including VSCODE.

philoSurfer avatar Aug 01 '19 17:08 philoSurfer