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

High CPU usage #73318

Closed
BeiJiXingYu opened this issue May 6, 2019 · 9 comments
Closed

High CPU usage #73318

BeiJiXingYu opened this issue May 6, 2019 · 9 comments
Assignees
Labels
info-needed Issue requires more information from poster perf

Comments

@BeiJiXingYu
Copy link

Issue Type: Performance Issue

使用中cpu占用率会突然升高至90%以上,关闭VScode后恢复正常

VS Code version: Code 1.32.2 (e64cb27, 2019-03-13T02:00:46.035Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
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
Memory (System) 7.95GB (3.07GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (33)
Extension Author (truncated) Version
html-snippets abu 0.2.1
vscode-javascript-snippet-pack aka 0.1.5
npm-intellisense chr 1.3.0
path-intellisense chr 1.4.2
cssrem cip 0.0.7
vscode-simpler-icons dav 1.6.5
vscode-eslint dba 1.8.2
jquerysnippets don 0.0.1
vscode-html-css ecm 0.2.0
vscode-nginx-conf-hint han 0.1.0
beautify Hoo 1.5.0
weex jay 0.4.0
docthis joe 0.7.1
svn-scm joh 1.48.1
prettify-json moh 0.0.3
easy-less mrc 1.4.5
vscode-less mrm 0.6.3
vscode-language-pack-zh-hans MS- 1.32.4
mssql ms- 1.5.0
js-atom-grammar ms- 0.1.14
debugger-for-chrome msj 4.11.3
vetur oct 0.19.5
es6-css-minify olb 2.6.0
vuehelper oys 0.1.0
vscode-versionlens pfl 0.23.0
material-icon-theme PKi 3.7.0
vscode-css-peek pra 2.2.0
vscode-jsp pth 0.0.2
view-in-browser qin 0.0.5
sass-indented rob 1.5.1
vscode-nginx sha 0.6.0
language-stylus sys 1.11.0
ayu tea 0.18.0

(2 theme extensions excluded)

@RMacfarlane
Copy link
Contributor

Hey @BeiJiXingYu , can you follow the guide here to try to diagnose the problem? https://github.com/Microsoft/vscode/wiki/Performance-Issues

@RMacfarlane RMacfarlane changed the title 使用中cpu占用率会突然升高 High CPU usage May 6, 2019
@RMacfarlane RMacfarlane added info-needed Issue requires more information from poster perf labels May 6, 2019
@RMacfarlane RMacfarlane self-assigned this May 6, 2019
@zehawki
Copy link

zehawki commented May 6, 2019

Its impossible to use VS Code like this. Can we have a solution please. Pretty please. High CPU usage issue has been pointed out so many times now at SO, github, reddit and so on.

  1. Nearly constant CPU usage of close to 40%. I'm doing nothing on VS Code right now, still the constant CPU usage.

image

  1. Every time I type, the CPU usage spikes,

image

  1. Periodically it will reach 80 - 90% and just stay there till I close VS Code and then the rigmarole starts again.

NO extensions are enabled.

@zehawki
Copy link

zehawki commented May 6, 2019

VS Code version: Code 1.33.1 (51b0b28, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)
GPU Status 2d_canvas: enabled
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
Memory (System) 15.90GB (2.21GB free)
Process Argv
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    1	    93	 54260	code main
    1	    66	 41424	   window (Issue Reporter)
    0	   293	 42488	   window (● location_card.js - ne_frontend (Workspace) - Visual Studio Code)
    0	    13	 50572	     electron-crash-reporter
    0	    89	 53220	     extensionHost
   27	   981	 65512	       electron_node tsserver.js 
    0	    44	 44940	         electron_node typingsInstaller.js typesMap.js 
    0	    38	 58528	     watcherService
    0	    33	 62268	     searchService
    0	   255	 62388	   gpu-process
    0	    72	 64456	   shared-process
Workspace Info
|  Window (● location_card.js - ne_frontend (Workspace) - Visual Studio Code)
|    Folder (ne_frontend): more than 29294 files
|      File types: js(14399) ts(6350) json(2504) md(1882) map(859) png(230)
|                  yml(205) svg(201) flow(198) mjs(162)
|      Conf files: package.json(1384) tsconfig.json(52) makefile(28)
|                  webpack.config.js(10) tslint.json(7) grunt.js(4) gulp.js(3)
|                  settings.json(2);
Extensions: none

@RMacfarlane
Copy link
Contributor

Thanks for the additional info @zehawki, from the process info it looks like the typescript server is what's using high CPU for you. Are you in a workspace that has @types/styled-components installed? Please make sure it's the latest version (see this issue)

@BeiJiXingYu can you also include process information?

@zehawki
Copy link

zehawki commented May 10, 2019

Are you in a workspace that has @types/styled-components installed?

Sorry, a bit of a stupid question - how do I check that? I've not installed any package for this, neither is it in my package.json. But could it have come in via a library, e.g. like this https://material-ui.com which I'm using. Where can I check? Thanks.

@leolozes
Copy link

I'm having the same issue, the electron_node tsserver.js process uses 20-30% of the CPU constantly.
I'm using material-ui as well.
I already had the same issue and fixed it before but this should be fixed without having to do this manually every time.

@RMacfarlane RMacfarlane assigned mjbvz and unassigned RMacfarlane May 17, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented May 17, 2019

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

@leolozes
Copy link

@mjbvz I don't recall having this issue with the latest insider build. I had it with the last and current VS Code releases, and I fixed it both times with the workaround I linked.

@mjbvz
Copy link
Collaborator

mjbvz commented May 22, 2019

Closing as we need more information from @BeiJiXingYu

IF you are still seeing performance issues in the latest VS Code insiders build, please open a new issue

@mjbvz mjbvz closed this as completed May 22, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster perf
Projects
None yet
Development

No branches or pull requests

5 participants