-
Notifications
You must be signed in to change notification settings - Fork 1.2k
vscode-python repeatedly launching wmic #1277
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
Comments
Can you try setting |
It is checking Jedi process memory footprint. It can be turned off. |
My suggestion is to take control of the use of @brettcannon @MikhailArkhipov |
Making that change did resolve (or suppress) the problem. But I've found that hitting WMI frequently has the same adverse affect; if there's a way to do it outside of WMI it's probably a good thing. |
@DonJayamanne - I wouldn't worry too much. I think we can change default memory control to off (or at least on Windows). In the new analysis engine we have internal control of the memory consumption so the setting won't be needed eventually. |
I was experiencing this issue as well, but the workaround posted above worked for me. I'm very interested to understand the root cause of this issue because it isn't the first time I've had these symptoms. I'm not even a Python developer normally (I usually write TypeScript and C# code), but I had been given a Python script to decipher and I used VSCode mainly for the syntax highlighting and IntelliSense. I did install the vscode-python extension and later I noticed my CPU was pegged at 100%. Unfortunately, I did not suspect VSCode (or the Python extension) at first because I have previously had issues with high-CPU usage in WmiPrvSE.exe with extremely similar symptoms. FYI, this is a corporate machine with a ton of monitoring software on it, so I have assumed that one of those monitoring or security processes is overusing the WMI functionality. One of the symptoms was McAfee anti-virus repeatedly being required to scan tzres.dll and tzres.dll.mui, hundreds of times a second. McAfee has posting about this issue below, but of course, they claim the root cause is always something other than their software (and the article below links to a Microsoft posting for troubleshooting WMI, which again says the root cause is not WMI but something using it). High CPU usage by mcshield.exe, and wmiprvse.exe and mcshield.exe are repeatedly opening and closing tzres.dll and tzres.dll.mui The symptom above was definitely occurring in this case, and the workaround stopped it. However, I have had the same symptom even when VSCode was not running and something else was causing it (perhaps regular Visual Studio Professional or Chrome or one of those dozens of corporate bloatware processes that are always running). Thus, I would appreciate any insights into the root cause. Thanks! |
@YipYipX4 the problem is that we use a project called Jedi for our IntelliSense and some users have complained about massive memory usage. So we introduced a mechanism to monitor the memory and prevent it from getting too big. Unfortunately the mechanism has had some adverse effects as well, so we are trying to figure out how best to handle this. |
WMI just doesn't perform well if you use it frequently (as in poll every 5 seconds). You can get the same information from the performance counters library w/o incurring the wmi perf hit. |
Environment data
Actual behavior
When open to a python file, code with the Python extension enabled is continually launching
wmic processes. This in turn backs the wmiprvse.exe service up, to the point where very
quickly it's consuming 100% of the CPU (on one core).
Expected behavior
VSCode shouldnt' cause my CPU to be fully loaded when nothing's actually happening
Steps to reproduce:
Install VSCode
Install the python extension
Open a python file.
Watch in taskmgr/process explorer as
wmic
processes are created repeatedly.Disable python extension
Watch as no further
wmic
processes are created, and processor returns to idle.The text was updated successfully, but these errors were encountered: