Comments (8)
I am worried that even when you find a way to reproduce, I cannot think about a way to fix this.
from vscode-php-intellisense.
What are you suggesting it to do? It is a child process of VS Code, it should die automatically
from vscode-php-intellisense.
I can confirm now that the language server processes in some weird cases are not closed with VSCode, after opening multiple projects sometimes it spawns multiple processes which stay up after the VSCode process exits.
While VSCode runs the php processes look normal but after a couple of minutes of closing code, the CPU usage ramps up and start to impact system performance.
I'll try to take some time to further investigate this and figure out a way to reliably reproduce the issue.
from vscode-php-intellisense.
I just noticed this as well. When I quit VS code, the spawned process doesn't exit at all!
from vscode-php-intellisense.
These processes have been collecting since last evening. I let it run overnight to see if they would eventually die but they haven't. I think my computer went to sleep at one point but once I opened it again this morning, they resumed their torture. I have shut down and reopened VSCode several times since last evening. Ah, it seems that a new one is spawned each time I reopen VSCode because after restarting again I now have 6 php processes :)
I'm on a MacBook Air with VSCode 1.11.1 but this issue has been occurring over the course of the last year through each upgrade of VSCode and this extension.
For this case, I was simply in the middle of writing code when things started to get sluggish and the fan starting whirring. How does the indexer decide to start indexing? Does it randomly start up? I don't see anything interesting in devtool console log.
from vscode-php-intellisense.
I would accept a PR that implements a poll of the pid passed to initialize at a regular (not too small) interval.
from vscode-php-intellisense.
How does the indexer decide to start indexing? Does it randomly start up?
It starts indexing on startup, once. Then it's just parsing of files you change.
I don't see anything interesting in devtool console log.
Look at the output panel instead.
from vscode-php-intellisense.
Thanks for the help. I tracked down my particular issue with the code pasted below. The code came from the PHPUnit website but is missing require __DIR__.'/../vendor/phpunit/dbunit/PHPUnit/Extensions/Database/TestCase';
, which is what seems to be causing the issue. I do have the DbUnit php extension installed (via composer require --dev phpunit/dbunit
). The question is why would this cause the indexer to hang and run indefinitely, even after VSCode is shut down?
Adding the require line and then saving does not fix the issue, so maybe the indexer is too busy in its infinite loop at that point to pick up the change. What does fix the issue is to add the require, shut down VSCode, kill the orphaned php process, and then start VSCode again. At the point, I can see it and everything else get indexed in the output panel.
Hopefully posting this can help with debugging the issue.
<?php
class IntegrationTestCase extends PHPUnit_Extensions_Database_TestCase
{
private static $pdo = null;
private $conn = null;
public function getConnection()
{
if ($this->conn === null) {
if (self::$pdo == null) {
self::$pdo = new PDO('sqlite::memory:');
}
$this->conn = $this->createDefaultDBConnection(self::$pdo, ':memory:');
}
return $this->conn;
}
public function getDataSet()
{
return new PHPUnit_Extensions_Database_DataSet_YamlDataSet(dirname(__FILE__)."/files/integration/integration.yml");
}
}
from vscode-php-intellisense.
Related Issues (20)
- Extension issue
- Extension issue
- Extension issue
- Keeps popping up with a Warning saying that the extension is not working properly. So I disabled it.
- php intellisense not found in vscode HOT 4
- Extension issue - PHP IntelliSense ver 2.3.14
- Extension issue
- function names inserted as GlobalFunctionName
- Extension issue
- Dependency Dashboard
- Extension issue
- Deprecation notice on start-up
- Go to definition not working on use statements HOT 1
- phpcs: Unable to locate phpcs. Command failed: "C:/Servers/php8" --version '"C:/Servers/php8"' is not recognized as an internal or external command, operable program or batch file.
- Extension issue
- This plugin shows an error when using PHP mixed with HTML
- Is this dead? HOT 2
- Deprecation warning via Github Copilot
- PHP + HTML indentation pattern
- Go To Definition fails with Definition not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-php-intellisense.