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.33 performance issues with TypeScript and JavaScript #71751

Closed
leeandher opened this Issue Apr 5, 2019 · 8 comments

Comments

Projects
None yet
6 participants
@leeandher
Copy link

leeandher commented Apr 5, 2019

  • VSCode Version: 1.33
  • OS Version: Windows 10 (v1809)

Steps to Reproduce:

  1. Launch VSCode

Does this issue occur when all extensions are disabled?: Yes

After updating to the latest version of VSCode, it became pretty much unusable. I mainly work on web development, so that's all that I could speak on but things became measurably slower.

At idle it was consuming 45+% of CPU usage and ~1 GB RAM

Errors stopped dismissing/updating:
image

Suggestions/Intellisense stopped showing up (or took 3s+ to show up if at all):
image

Emmet/Tag autocomplete stopped functioning:
image

When I downgraded, it seemed to all go away, I tried reinstalling 3 times, everytime I selected the upgrade the problems came back. I also restarted VSCode and my computer multiple times. For now, I'm just staying at 1.32.3.

@mjbvz mjbvz self-assigned this Apr 5, 2019

@mjbvz

This comment has been minimized.

Copy link
Contributor

mjbvz commented Apr 5, 2019

Please follow these instructions to collect performance information. Share the output of code --status

Could be Microsoft/TypeScript#30663

@leeandher leeandher changed the title 1.33.3 Massive performance issues 1.33 Massive performance issues Apr 5, 2019

@leeandher

This comment has been minimized.

Copy link
Author

leeandher commented Apr 5, 2019

code --status output:

Version:          Code 1.33.0 (0dd516dd412d42323fc3464531b1c715d51c4c1a, 2019-04-04T15:14:28.026Z)
OS Version:       Windows_NT x64 10.0.17763
CPUs:             Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
Memory (System):  15.87GB (8.62GB free)
VM:               0%
Screen Reader:    no
Process Argv:
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

CPU %   Mem MB     PID  Process
    1       85   14656  code main
    0      195    3560     window (Release Notes: 1.33.0 - leander.xyz - Visual Studio Code)
    0       34    5616       searchService
    0       14    7700       electron-crash-reporter
    0      110   14692       extensionHost
    0       53    5696         electron_node server.js
    0       32   13164         "C:\Users\leand\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\leand\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=14692
    0       73   13836         electron_node eslintServer.js
    8      433   16508         electron_node tsserver.js
    0       45   11968           electron_node typingsInstaller.js typesMap.js
    0       11   15216       watcherService
    0       11   10456         console-window-host (Windows internal process)
    0       65   15688     shared-process
    0       87   17900     gpu-process
    0       88   18324     window (undefined)

Workspace Stats:
|  Window (Release Notes: 1.33.0 - leander.xyz - Visual Studio Code)
|    Folder (leander.xyz): 480 files
|      File types: js(173) json(140) map(47) png(37) html(22) svg(12) md(11)
|                  gitkeep(9) yml(5) webmanifest(4)
|      Conf files: package.json(3) settings.json(1)
@leeandher

This comment has been minimized.

Copy link
Author

leeandher commented Apr 5, 2019

I might be incorrectly identifying this as a performance issue, but it's definitely disabling the above features in the editor some how.

The related issue seemed to be a TypeScript, which I'm not using. I am using styled-components at ^4.1.3 though.

@mjbvz

This comment has been minimized.

Copy link
Contributor

mjbvz commented Apr 5, 2019

Thanks. Yes this is in all likelihood a duplicate of Microsoft/TypeScript#30663. Typescript also powers our JavaScript intellisense so this is the correct issue even though you are not writing typescript

Main fix
We have pushed a fix upstream to the @types file that triggered this issue.

TypeScript users should make sure they are pulling in the latest version of @types/styled-components (4.1.13) and that 4.1.0-4.1.12 are not in your project

If you are using JavaScript, you may to clear your automatic typings cache to clear the file that caused this from their cache. To do this, delete the typings typing cache file listed below and restart vscode:

  • Mac: ~/Library/Caches/TypeScript/3.4
  • Windows: %LOCALAPPDATA%\Microsoft\TypeScript\3.4
  • Linux: ~/.cache/typescript/3.4

Other possible workarounds:

@janosh

This comment has been minimized.

Copy link

janosh commented Apr 6, 2019

@mjbvz Thanks for this advice! rm -r ~/Library/Caches/TypeScript/3.4 (Mac) indeed solved the issue for me.

@mupkoo

This comment has been minimized.

Copy link

mupkoo commented Apr 8, 2019

Clearing the cache and upgrading the styled-components types fixes the problem, but the performance is still really bad...

PS Downgrading TypeScript gives me the best result

@Daniel-Griffiths

This comment has been minimized.

Copy link

Daniel-Griffiths commented Apr 9, 2019

I also have really bad performance after upgrading VS Code to 1.33

@grepug

This comment has been minimized.

Copy link

grepug commented Apr 11, 2019

downgrading typescript to 3.3.3 solved this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.