Git Product home page Git Product logo

Comments (9)

felixfbecker avatar felixfbecker commented on July 29, 2024

It should only spawn one process, the language server. CPU usage will be quite high while the server indexes your process. You can see the process of that in the output panel.
If there are multiple processes that could mean there was an error, VS Code restarts it but the old server is not killed correctly. Try to see if Help > Toggle Developer Tools gives you any error messages.

from vscode-php-intellisense.

yarcowang avatar yarcowang commented on July 29, 2024

Hi, after i toggle on the develops tools, i see a lot of messages from:
file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js

Example (it continuously generates messages like this):

workbench.main.js:121 [Extension Host] Content-Type: application/vscode-jsonrpc; charset=utf8
Content-Length: 480

{"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":null,"signatureHelpProvider":null,"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":null,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":null,"codeLensProvider":null,"documentFormattingProvider":true,"documentRangeFormattingProvider":null,"documentOnTypeFormattingProvider":null,"renameProvider":null}},"id":0,"jsonrpc":"2.0"}

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024

That is totally expected, it just logs the communication. It's only interesting if it's red

from vscode-php-intellisense.

yarcowang avatar yarcowang commented on July 29, 2024

I think I may find the problem, but I don't understand, I've already set vendor/ directory to be ignored...but workbench.main.js still go through a lot of files under that directory

 "files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/node_modules/**": true,
    "**/vendor/**": true
  },

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024

That setting is not used by the server in any way, it searches the workspace for PHP files itself.

from vscode-php-intellisense.

yarcowang avatar yarcowang commented on July 29, 2024

So how to ignore them?
I think the reason is there are a lot of PHP files under the vendor/...
And I see there are some settings in the php-language-server.php:
ini_set('memory_limit', $options['memory-limit'] ?? -1);
So how to limit the CPU usage?

[Extension Host] Content-Type: application/vscode-jsonrpc; charset=utf8
Content-Length: 178

{"method":"window\/logMessage","params":{"type":3,"message":"Parsing file 882\/11839: vendor\/behat\/transliterator\/src\/Behat\/Transliterator\/data\/xfc.php."},"jsonrpc":"2.0"}Content-Type: application/vscode-jsonrpc; charset=utf8
Content-Length: 253

{"method":"textDocument\/publishDiagnostics","params":{"uri":"file:\/\/\/Users\/yarco\/Documents\/projects\/jobs\/newband\/newband-apiv2\/nbapp\/vendor\/behat\/transliterator\/src\/Behat\/Transliterator\/data\/xfc.php","diagnostics":[]},"jsonrpc":"2.0"}

from vscode-php-intellisense.

yarcowang avatar yarcowang commented on July 29, 2024

No one met this before?

Mac OS: 10.10.5
VSCode: 1.7.1
PHP: 7.0.10
Symfony 3

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024

I think what you are looking for is either caching or ignoring files. Please see

felixfbecker/php-language-server#141
felixfbecker/php-language-server#121

from vscode-php-intellisense.

yarcowang avatar yarcowang commented on July 29, 2024

I see.

from vscode-php-intellisense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.