Skip to content
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

1 CPU: Visual Studio Code 100% CPU and System freeze on startup win 7 64 bit #34396

Closed
ParikshitBhagawati opened this issue Sep 14, 2017 · 50 comments
Assignees
Labels
electron Issues and items related to Electron freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues perf upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@ParikshitBhagawati
Copy link

I have a windows 7 64bit PC running on an AMD processor with on board NVIDIA graphics chipset and 8 gb of RAM. I have tried various versions of vs code but the result is the same. It freezes the system for about 2 minutes until it opens it with a 100% CPU usage.

I have also tried different options like disable GPU and running without extentions etc. but all in vain.

I have an older laptop with 1gig RAM and windows 7 32 bit where vs code 1.1 runs without any of the above issues smoothly.

Can you please help ?

  • VSCode Version: 1.1 tot 1.16
  • OS Version: Windows 7 Ultimate 64bit

Steps to Reproduce:

  1. Open visual studio code
  2. System freeze and 100% CPU

Reproduces without extensions: Yes

@alexdima
Copy link
Member

@ParikshitBhagawati VS Code uses multiple processes. Maybe it could help us figure out what's going on if we could find out which process is using 100% CPU. You can use a tool like process explorer and hover over the process that is at 100% CPU so we can find out the arguments it is launched with (i.e. identify which of our processes it is)

@alexdima alexdima added the info-needed Issue requires more information from poster label Sep 15, 2017
@ParikshitBhagawati
Copy link
Author

@alexandrudima thanks for your response. attached is the screenshot from process explorer. please let me know if this help you with the info you were looking for.
p.s - using the insiders build now.
processexplorersnapshot

@ParikshitBhagawati
Copy link
Author

perf-vscode_ii

Here's more from today!

@alexdima
Copy link
Member

I haven't seen so far our main process going crazy like this.

@alexdima alexdima added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Sep 18, 2017
@bpasero
Copy link
Member

bpasero commented Sep 18, 2017

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

@bpasero bpasero added this to the Backlog milestone Sep 18, 2017
@ParikshitBhagawati
Copy link
Author

Well, the profile sent before was with the insiders build (Version 1.17.0). The link you provided however takes me to the download page for the latest stable build I guess, which is 1.16.1. But I downloaded it anyway with no change in results (100% CPU, unresponsive system etc.) and took 10 minutes to open.

Attached is the profile snapshot with the latest build.

version-1 16 1

Thanks!

@bpasero
Copy link
Member

bpasero commented Sep 18, 2017

@ParikshitBhagawati is this a single CPU VM?

@ParikshitBhagawati
Copy link
Author

Its not a VM.. It's a native single core processor.

@bpasero
Copy link
Member

bpasero commented Sep 19, 2017

Yeah. VS Code does not run well on 1-CPU systems. This is a known issue that was reported before.

@bpasero bpasero changed the title Visual Studio Code 100% CPU and System freeze on startup win 7 64 bit 1 CPU: Visual Studio Code 100% CPU and System freeze on startup win 7 64 bit Sep 19, 2017
@ParikshitBhagawati
Copy link
Author

So is there a fix /work around for this yet or planned in the future ? Or it just wont work ?

@vaibhavsingh97
Copy link

I also facing same issue. After launching visual studio, RAM become 100% and my desktop freezes
OS: Arch Linux
Kernel: 4.13.4-1-ARCH

@bpasero bpasero mentioned this issue Nov 7, 2017
@bpasero bpasero added perf and removed workbench info-needed Issue requires more information from poster labels Nov 15, 2017
@bpasero bpasero removed this from the Backlog milestone Nov 15, 2017
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Nov 17, 2017
@ahumeniy
Copy link

ahumeniy commented Dec 14, 2017

In Windows you can launch VS Code with low or below normal CPU priority and it won't freeze your machine. If you're already affected you can open task manager and set the priority for the processes using 100% CPU to either low or below normal priority. After a while the high CPU usage will stop.

@royBrocken
Copy link

I changed my win7 VM to use multiple processors, and vscode is running fine again.

@lbertolotti
Copy link

My system is not freezing, but it almost did.

  • VS code version 1.9.1 Architecture x64
  • OS version: Windows 10 Home
  • Processor: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz 2.40 GHz
  • Installed memory(RAM): 4.00 GB (3.89 GB usable)
  • System type: 64-bit Operating System, x64-base processor
  • memtest 86+ no errors found.

firefox

@ParikshitBhagawati
Copy link
Author

As mentioned by @bpasero VS code doesn’t work well with single core CPUs. I had an option to enable multiple cores for my processor and when I did, Code started to work fine without the system freeze / 100% CPU issue.

@TBubba
Copy link

TBubba commented Jun 26, 2018

I had the same issue on my garbage single core CPU laptop, but changing the priority of the process to "Below Normal" makes it work fine. Now it's at 0% usage most of the time and goes up to ~10% when the window re-renders. Thanks y'all!

(In my case, setting the priority to "Low" made it a little bit more responsive than "Normal" but it still used 100% CPU)

@3dfoster
Copy link

3dfoster commented Jul 7, 2018

@bpasero I am having the same issue on an AMD Ryzen 1300x (four physical cores) so I don't think it is a single core issue.

vscode_high_cpu_usage

@bpasero bpasero added the electron Issues and items related to Electron label Sep 5, 2018
@ignite-404
Copy link

same here

@bpasero bpasero removed bug Issue identified by VS Code Team member as probable bug labels Sep 11, 2018
@JohnProg
Copy link

same here

@jmbuhr
Copy link

jmbuhr commented Oct 24, 2018

same issue on Win 10, with code and code-exploration. Also code doesn't open without internet connection

@LydiaMennes
Copy link

same here, it makes the IDE almost unusable

@r4hulCorleone
Copy link

I had same problem with newest update ,1 physical core ,100 cpu usage,window 7
[Solution]:change compability mode to windows xp sp3 for vs code solved my problem.

@ergenekonyigit
Copy link

same problem here.

  • macOS 10.14.1
  • code 1.29.1

@KristofStroobants
Copy link

Same problem here. I reverted back to 1.25
Seems like that is the latest usable version for me.
Is there any update on a fix ????

@gustaff-weldon
Copy link

gustaff-weldon commented Nov 21, 2018

Experiencing the same issue. CodeHelper is stuck on ~100%.
screen shot 2018-11-21 at 09 53 09

ps aux output on that process:

✗ ps aux | grep 13158
-edited-    13158  99.5  1.4  6194332 242864   ??  R    Tue09AM  59:28.99 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/5b/gz8j6f890kb2pd1n6zfn09c00000gn/T/vscode-typescript/tscancellation-87c31d99c306e6ae821e.tmp* --locale en --noGetErrOnBackgroundUpdate

Looks like Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js is a culprint. My project is a monorepo with a lot of JS code (not TS enabled)

OSX 10.13.6
Code 1.29.1 (1.29.1)

@kyegupov
Copy link

same issue (Linux - Xubuntu 18.10, vscode 1.29.1)

@lautis0503
Copy link

This could be a bug from electron. There's a bug fix finally.
electron/electron#15975

@bpasero
Copy link
Member

bpasero commented Jan 4, 2019

I finished a build with the fix from electron/electron#15975:

https://az764295.vo.msecnd.net/insider/5967828c2a5c559ed86c3369ed9811bb1bd6386b/VSCode-win32-x64-1.31.0-insider.zip

Can people report back if this is fixed with that build?

@bpasero bpasero added this to the On Deck milestone Jan 4, 2019
@9chu
Copy link

9chu commented Jan 4, 2019

I finished a build with the fix from electron/electron#15975:

https://az764295.vo.msecnd.net/insider/5967828c2a5c559ed86c3369ed9811bb1bd6386b/VSCode-win32-x64-1.31.0-insider.zip

Can people report back if this is fixed with that build?

image

Solved on my VPS with 1 core CPU, running Windows Server 2012 R2.

@pkathro
Copy link
Contributor

pkathro commented Jan 4, 2019

I finished a build with the fix from electron/electron#15975:

https://az764295.vo.msecnd.net/insider/5967828c2a5c559ed86c3369ed9811bb1bd6386b/VSCode-win32-x64-1.31.0-insider.zip

Can people report back if this is fixed with that build?

This build fixed the issue for me.
Tested on 2 x single core VMs running Win 2008 and 2008 R2 respectively

@bpasero
Copy link
Member

bpasero commented Jan 4, 2019

Very cool, thanks for confirming!

@bpasero
Copy link
Member

bpasero commented Jan 25, 2019

Closing this issue given that we plan to release VSCode stable early February with Electron 3.x. If you want to benefit from the fix already, consider to use our insiders version that already contains the fix: https://code.visualstudio.com/insiders/

@KristofStroobants
Copy link

Insider or not; electron 3 or not, VS Code takes minutes to just open up.
My only good working version is v1.25. Anything above that is so slow that it becomes unusable at this point. There are so many people mentioning this but i haven't read about a fix. Yeah you can have a look into the processes but that gives you numbers we don't even understand. I really wish you guys either came out with a fix OR with some better way for us to help finding out what is causing this.

@viniciusgati
Copy link

I finished a build with the fix from electron/electron#15975:
https://az764295.vo.msecnd.net/insider/5967828c2a5c559ed86c3369ed9811bb1bd6386b/VSCode-win32-x64-1.31.0-insider.zip
Can people report back if this is fixed with that build?

This build fixed the issue for me.
Tested on 2 x single core VMs running Win 2008 and 2008 R2 respectively

Me to.

@ssj7
Copy link

ssj7 commented Mar 4, 2019

I have a core i7 and it still takes about 10 sec to open an ionic project. I have 16GB ram.
Version: 1.31.1 (user setup)
Commit: 1b8e830
Date: 2019-02-12T02:20:54.427Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 6.3.9600

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues perf upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests