JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
880 stars 97 forks source link

High CPU usage when plugin is enabled #666

Closed Tam closed 1 year ago

Tam commented 1 year ago

Describe the bug My CPU usage is spiking to 400-600% when the GraphQL plugin is enabled in Webstorm

To Reproduce Use the plugin on medium to large size schema files (20,000+ lines)

Expected behavior The CPU usage (hopefully) shouldn't be this high, I don't remember noticing it on older versions of the plugin.

Screenshots Enabled:

Screenshot 2023-05-02 at 16 34 05

Disabled:

Screenshot 2023-05-02 at 16 37 05

Version and Environment Details Operation system: MacOS Ventura 13.3.1 (22E261) (Apple M1) IDE name and version: WebStorm 2023.1.1 Plugin version: 4.0.0

vepanimas commented 1 year ago

Hi! Could you please make a CPU snapshot at the very moment of high CPU usage, upload it here and then share the upload ID?

To start CPU profiling please use (Help | Diagnostic Tools | Star/Stop CPU Usage Profiling action) and several thread dumps (Diagnostic Tools | Dump Threads action) also at the time of reproduction.

Tam commented 1 year ago

Turns out this is a non-issue. I didn't realise that another project had opened in the background (one with a schema file well over 110,000 lines long), which has always run poorly. With that closed CPU usage plummets to ~3% 😅