Skip to content

VSCode TypeScript error suggestions are slow #37746

@quicksnap

Description

@quicksnap

Issue Type: Performance Issue

Hello all! Sorry about the vague title.

Our project has had ongoing performance issues with TSC / VSCode, where VSCode is generally very sluggish to update its TypeScript error/warning state.

A few libraries we use may be culprits, but it's difficult to track down what's going on, or if this kind of performance is expected. Two libraries that may be causing us issues are styled-components@4.4.0 and fp-ts@1.19.5.

I've been able recently to isolate a specific example: when changing a token to something invalid, it takes ~2-3 seconds for a response from TS. This in itself feels slow, but possibly acceptable. However, performance in day-to-day work for our devs can sometimes become really bad, taking up to 10 seconds or just becoming unstable.

I've attached some logs from when I hit the s key on the token onChange, making it become invalid: Isolated Logs.txt

As the stats below show, we do have a large-ish file graph, but it's not too crazy.

I'm happy to provide as much information as needed. Really appreciate any help with this!

VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:34:57.037Z)
OS version: Darwin x64 19.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (10.69GB free)
Process Argv --disable-extensions
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
   10	   131	 79867	code main
    5	    98	 79896	   gpu-process
    0	    33	 79909	   utility
    6	   393	 79911	   window (Isolated Logs.txt — client)
    0	    98	 79950	     extensionHost
    0	    66	 80458	       /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/jsonServerMain --node-ipc --clientProcessId=79950
    0	    98	 91429	       electron_node tsserver.js 
    0	   819	 91430	       electron_node tsserver.js 
    0	    66	 91431	         electron_node typingsInstaller.js typesMap.js 
    0	    33	 91222	     watcherService
    0	    66	 91937	     searchService
   52	    98	 80062	   shared-process
    0	     0	 99638	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
   49	    66	 99630	   window (Issue Reporter)
Workspace Info
|  Window (Isolated Logs.txt — client)
|    Folder (client): 9241 files
|      File types: js(3185) map(2350) tsx(912) ts(875) svg(253) scss(193)
|                  png(71) css(40) jpg(36) json(18)
|      Conf files: package.json(4) tsconfig.json(1) tslint.json(1)
|                  settings.json(1);
Extensions disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions