-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
High CPU Usage on Windows with Mapped Drive when leaving VS Code Open for a while #70566
Comments
Could you look at the tips on this page and provide more details to help us understand what's happening? https://github.com/Microsoft/vscode/wiki/Performance-Issues#visual-studio-code-is-consuming-a-lot-of-cpu Have you seen this before on earlier releases? |
First I've hit it is on 1.32.x (i think 1.32.0, but maybe 1.32.1). I'll read through the tips, and keep an eye on process explorer. Will update, but might not be until Monday as I'm getting ready to wrap up for the day and haven't tried to repro on my home computer |
Does this reproduce in the latest VS Code insiders build with all extensions disabled? |
@mjbvz I can install that and check it out tomorrow. Still trying to get a CPU profile, but when I encounter this my laptop is so slammed that I can't get much out of the dev tools. Trying to grab a profile now and having trouble, but, I did notice that I am getting thousands of console errors (see attached). As mentioned in the OP, my project is on a mapped network drive and I just reproduced the issue at home on my work laptop without being connected to the work VPN (so, no access to the mapped drive). So, basically, I left my laptop on with VS Code open, and just closed the laptop, then came home and reopened the laptop with VS Code still open and no access to the mapped drive. I'm wondering if this has something to do with VS Code trying to index files or something and being unable to read the files. Tried to include the stack trace there in the screen shot, but, like I said, CPU is super slammed and it was a chore to even get the error to expand. |
I can reproduce the issue on the Insiders Build with extensions disabled. Pretty confident it's related to losing the mapped drive. I'm connected to the work network on Wi-Fi and can reproduce pretty easily on Insiders and 1.32.x. Updated Steps:
CPU spikes up to double digits (for me) and stays there. thousands of errors (see previous comment) in the console. CPU does not go back down when the network drive is reconnected. Let me know if there's more info I can provide. |
@rdwoodring can you possibly attach all the logs from VSCode, those errors look interesting. Also can you run a session with --verbose and then attach the logs, maybe there is more detail. The logs folder can be opened from the commands "Logs Folder". |
@zspitzer is it possible that you are not on the latest VSCode version? That source code looks like from node.js which does not match our current sources. |
@deepak1556 may I ask if you have any clue where this code lives in Electron? The check certainly seems fishy to me to check for null and not undefined... |
@deepak1556 wow it looks indeed like this code lives in https://github.com/electron/node/blob/fcaf11a29c421b0e76c9f24f5b155a53eff14e7f/lib/fs.js#L1383. How is it possible that the Electron version of node differs from the one official one? |
Oh wow, ok: electron/node#70 (comment) |
20190321T081202.zip |
Thanks, yeah again many of |
Bumping this discussion to indicate this probably requires a fix to Electron's |
I see this issue has been quiet for a while now. This is a problem that I face every day, so any workaround that anyone can suggest will be highly appreciated. |
Also facing a severe performance issue with this -- 90% CPU usage , high mem + mem leak. Opening Dev Tools console shows an endless stream of FsEvent.FsWatcher._handle.onchange errors -- in the 20 minutes I've had the console open I've received over 400,000 of them. It's unfortunately making code unusable now. I haven't been able to precisely repro the issue yet, but the steps outlined above are essentially what I experience. It only started occurring in a relatively recent update, and tends to occur after waking the PC from sleep. PC wakes up and I find the code window completely unresponsive, with the above errors streaming in. (I've received another 50,000 errors in the time it's taken me to write this paragraph). Appreciate the work so far, it appears to be an issue upstream w/ Electron. Hope to see a fix flow down to code soon so I can resume using my favorite editor. |
Electron |
Great, thanks! |
@shiftkey @todonovan we already updated in our insider builds. You can give our preview releases a try from: https://code.visualstudio.com/insiders/ |
Thanks. This has been bugging me as well for a while now since I operate out of a mapped network drive and change my connectivity from wired to wireless quite often as I move about the office. The latest insiders build (1.34.0 with Electron 3.1.8) seems to fix the issue as mentioned.
Edit: nevermind that last point. That still seems to happen. |
Closing based on comments. |
Issue Type: Performance Issue
Expected Outcome
CPU might spike during use, but should drop back down
Actual Outcome
CPU spikes and stays up in the double digits, often as high as 60-80%, causing the editor and other apps on the machine to be almost unusable.
VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Process Info
Workspace Info
Extensions (19)
The text was updated successfully, but these errors were encountered: