1

recently I observed VScode is using an insane amount of memory and after some debugging, I realized it was caused by mypy. Basically, whenever I opened a python file, mypy launched a python process which quickly increases to more than 20G. The issue will go away only if I turned off mypy linting in vscode.

The only related config is this in workspace config file:

"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": [],

VScode version:1.66.2 Python: 3.8 Mypy: 0.910

derek
  • 9,358
  • 11
  • 53
  • 94
  • You can reach out to its GitHub repo, https://github.com/python/mypy/issues – Lex Li May 10 '22 at 01:21
  • I have the same problem. It spawns never ending processes over and over again and consumes all of cpu and ram :/ I also disabled it for now. – pafi May 11 '22 at 09:57

1 Answers1

0

I used to have problems with slow and memory consuming mypy too. I have a guess that it may be because VSCode is trying to index a rather large mypy_cache. I added the cache to the settings in the "files.exclude" and "python.linting.ignorePatterns" sections and it got better

pipeknight
  • 11
  • 3