Code Helper up a lot of CPU and memory

Project Architecture:

  React+TS+DVA

Equipment and software:

   Equipment: Mac 

   Software: VSCode

Scenes:

  Compile items found very Caton, lasted more than fifty-six minutes when using VSCode run on the Mac, and after the start of the project to access the page, the page will be significantly Caton.

Preliminary examination:

  Open Activity Monitor found Code Helper launched several, and prolonged occupation of a very high CPU and memory (more than 100% CPU, a Code Helper process is using more than one G memory)

solution:

  Insert the following code into setting.json VSCode go, and exit the program and restart VSCode

"search.followSymlinks": false
 "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/tmp": true,
    "**/node_modules": true,
    "**/bower_components": true,
    "**/dist": true
  },
  "files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/.git/subtree-cache/**": true,
    "**/node_modules/**": true,
    "**/tmp/**": true,
    "**/bower_components/**": true,
    "**/dist/**": true
 }

Solve results:

   1.CPU up a lot of memory and decline in memory will be reduced to a Code Helper process is using more than 200 M.

   2. Compile time a slight reduction

   3. Run the project, the browser page card Dungan apparently disappeared

  (The following figure shows the memory footprint optimization)

  

 

 

 Triggered By:

  The following is a reason to go to the next VSCode gitGub point of view this problem in summarizing the discussion 

  1. Some plug-ins caused by the problem, you can try to disable all plugins VSCode try again

    2. Due to some references TS packet or plug lead

    Personally I prefer the second reason, because other items and no such problems, only two of TS with the emergence of this project, compile giant slow, page Caton, specific internal principle unknown, to be resolved

    GitHub can go watch some discussion on this issue

    https://github.com/Microsoft/vscode/issues/11963
    https://github.com/microsoft/vscode/issues/11096#issuecomment-274879938
    https://github.com/microsoft/vscode/issues/51776

  

Guess you like

Origin www.cnblogs.com/suihang/p/11946434.html