-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of mypy
processed launched after bulk search/replace
#19646
Comments
@PeterJCLaw One of the things that we are trying to do for linting is moving it over to lint over LSP. We recently released To make it easier for people to build linting extension we also created an extension template. If you have any interest you could look into creating a |
Ah, that makes sense. Is the plan then to end up with a suite of extensions that users should install? I have to admit I quite like that at the moment there's just a single extension for "python" which pretty much does everything you need. I guess I'd assumed that maintenance of a single extension would be easier too, as boilerplate things like handling subprocess IO would be handled once rather than having several copies to keep up to date, though perhaps some of that goes away anyway? |
There are few reasons why we wanted to do this:
reference: https://twitter.com/brettsky/status/1555632119312879616 From the maintenance point of view, for the short term there is definitely lot more work, but once we have a stable set of things covered in the template and LSP implementation, we believe that the maintenance load should be considerably smaller. |
I'd like to bring this issue to notice again. This is quite annoying that a bunch of mypy processes run whenever I:
There are a lot we can do other than "having another extension for mypy". or until the eventual release a robust mypy extension you can either:
|
Please try this preview extension for https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
@karthiknadig sorry I wasn't able to test this sooner. That extension does seem to solve the issue of spinning up lots of separate processes (observed via |
@PeterJCLaw Can you share the list of process? with the extension there should only be Just for clarification, when testing out the extension did you turn of mypy from python extension? |
For clarity: I was confirming that the other extension does indeed appear to be free of this issue. |
If you have a large project that uses
mypy
and in that project you do a large find/replace across several files then you seem to get amypy
process launched for each file that is modified. I've observed the impacts from this being anywhere from a mild slowdown of my computer for a few moments to it causing my desktop (as well as several of themypy
processes) to OOM requiring a logout.The OOM failures are likely to be hard to reproduce with a small project, however the launching of lots of
mypy
should be observable.I'm on Ubuntu 20.04 with extension version
v2022.12.0
, though I've seen this on older extension versions too.It would be great if the extension could limit the number of processes launched in the case of a bulk search/replace happening (perhaps to the number of cores?) or, better, launch a single
mypy
process for the whole update.The text was updated successfully, but these errors were encountered: