-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Pyright consuming 100% CPU #4176
Description
Describe the bug
I am running pyright under neovim lsp. When pyright is running, I see:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
791059 lars 20 0 3072068 2.5g 37180 R 117.6 3.9 10:08.94 node
Examining the pyright process with strace, it appears to start by calling statx() on every single file in my home directory, which consumes an enormous amount of resources. This behavior is independent of the directory from which neovim was launched.
Even after it has finished scanning files it continues to consume 100% CPU; at this point strace shows lots of calls to futex() interspersed with calls to getpid() (about 35,000 times in 10 seconds).
To Reproduce
-
Configure neovim to use pyright:
require'lspconfig'.pyright.setup{ on_attach=on_attach, }Where
on_attachjust sets up a bunch of key mappings. -
Open a Python file with neovim.
Expected behavior
I expect pyright to check the syntax of the files I have open in neovim and nothing else.
Additional information
This is similar to #128 but @erictraut asked for a new issue for related problems.