graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
557 stars 71 forks source link

Extension causes high cpu load #171

Closed EzequielGnich closed 4 years ago

EzequielGnich commented 4 years ago

:warning: Make sure to attach this file from your home-directory: :warning:C:\Users\ezequ\Prisma.vscode-graphql-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

coreyward commented 4 years ago

I'm getting the same behavior on 0.2.14 on macOS. You can see from ps output that the only non-MS extension running in the offending process is vscode-graphql. Further, disabling the extension immediately resolves the issue.

/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) --max-old-space-size=3072 /Users/corey/.vscode/extensions/ms-vscode.vscode-typescript-next-4.0.20200511/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/tn/tsgjhxln2wz4sf5m8tm0297h0000gn/T/vscode-typescript501/695fa49891c127bd0b26/tscancellation-1c31aa6d5d9042e5e464.tmp* --globalPlugins typescript-vscode-sh-plugin,@divyenduz/ts-graphql-plugin --pluginProbeLocations /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features,/Users/corey/.vscode/extensions/prisma.vscode-graphql-0.2.14 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation

I don't know how to capture/generate a CPUProfile file for you (it isn't created as-is), but if someone provides documentation on that I could try to do so.

acao commented 4 years ago

I think this is caused by the watchman dependency which will soon be dropped, and has already been dropped from graphql-language-service-server

Would y'all be willing to test a pre-release for this to see if it eliminates your CPU load issues?

acao commented 4 years ago

https://github.com/prisma-labs/vscode-graphql/issues/181#issuecomment-672337523 here is a pre-release for testing, we will release to the prisma namespace once we've had enough people confirm the improvements are working and we don't have any major regressions!

acao commented 4 years ago

ok folks, try graphql.graphql-vscode-insiders 0.3.5 and see if this issue is fixed when watchman is removed? i'm hearing a yes from others. if you have any feedback, we are doing all of that in #184

acao commented 4 years ago

0.3.1 released! please open new tickets if you have any issues