apollographql / apollographql/apollo-tooling

Apollo vscode extension CPU usage

Open
#1,669 3 comments 1 reaction 0 assignees View on GitHub
:spiral_notepad: component - vscode
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

Version: Apollo vscode latest version.

The apollo vscode extension eats up so much CPU resources that my mac fans keep on spinning on full power (Macbook Pro 13, 100% CPU usage). As soon as I disable the extension the system becomes quiet again. Here is my config.

```
module.exports = {
client: {
includes: ['**/graphql.ts', '**/*.graphql.ts'],
excludes: ['node_modules'],
service: {
localSchemaFile: './schema.json'
}
}
};
```

There is only roughly 3 files with around 10 gql queries in sum. It also takes really long after starting vscode for apollo to spin up and do autocomplete and show context info on mouse hover. I've tried using the extension in differen projects and I've never been able to make it work without these issues (CPU hogging and poor performance).

This makes apollo vscode unusable for me unfortunately.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the Apollo VS Code extension using the supplied config, three files, and roughly ten queries. Profile CPU during VS Code startup and while autocomplete or hover context loads; done means the extension no longer causes sustained high CPU usage and those features become responsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.