Closed nickofthyme closed 2 months ago
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
@nickofthyme seeing the same thing and I've asked to reopen microsoft/vscode#96255
@nickofthyme Was the perf log information collected when using the TypeScript nightly extension?
Can you confirm the active TypeScript version by first opening a TS file and then running Select TypeScript version
@mjbvz I don't recall, but I'm pretty sure that was using 3.8.3
. I just ran the one below with the nightly extension enabled using typescript@4.0.0-dev.20200503
@nickofthyme Try checking 'TypeScript: Disable Automatic Type Acquisition' in the settings. That seems to have helped, for me at least.
@nickofthyme I saw similar behaviour in a project of mine (nuxt) where I had a .js file present (it was some server middleware) in a .ts application. After excluding the folder in my tsconfig.json, the cpu issues resolved.
@njprrogers what do you mean by present? You experienced this with any *.js
file in your code?
Having similar issue - vs code takes up to 90% CPU, any updates on solution? code --status
Version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z)
OS Version: Windows_NT x64 10.0.16299
CPUs: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4 x 2496)
Memory (System): 15.89GB (8.96GB free)
VM: 0%
Screen Reader: no
Process Argv:
GPU Status: 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
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
CPU % Mem MB PID Process
0 165 13564 code main
0 78 9288 shared-process
0 191 12240 gpu-process
0 28 12960 utility
0 16 13676 electron-crash-reporter
0 68 14212 window (Process Explorer)
0 194 16144 window (my.component.html - FRONTEND - Visual Studio Code)
0 92 12956 extensionHost
0 54 376 electron_node tsserver.js
0 55 1524 "C:\DEV\Microsoft VS Code\Code.exe" "c:\DEV\Microsoft VS Code\resources\app\extensions\html-language-features\server\dist\htmlServerMain" --node-ipc --clientProcessId=12956
0 37 4564 "C:\DEV\Microsoft VS Code\Code.exe" "c:\DEV\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=12956
70 287 14896 electron_node tsserver.js
0 47 3372 electron_node typingsInstaller.js typesMap.js
0 12 15456 watcherService
0 11 14464 console-window-host (Windows internal process)
Workspace Stats:
| Window (my.component.html - FRONTEND - Visual Studio Code)
| Folder (FRONTEND): 4087 files
| File types: ts(1653) html(1024) scss(287) json(132) svg(71) js(53)
| png(29) css(20) md(17) xml(4)
| Conf files: tsconfig.json(23) tslint.json(21) gulp.js(1)
| package.json(1)
Problems appears both on standard and insiders versions.
EDIT: I take it all back... seemed to work for a couple hours but now is behaving like it was before (except that now watcher is running away as well)
@nickofthyme Try checking 'TypeScript: Disable Automatic Type Acquisition' in the settings. That seems to have helped, for me at least.
worked for me. I'm setting up a new machine, don't have many additional extension installed yet, workspace is large (many directories and files etc) Version: 1.46.1 Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d Date: 2020-06-17T21:17:14.222Z Electron: 7.3.1 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Darwin x64 19.5.0
Another thing that seemed to help, but less than ideal, is to up the ts-server
memory under settings via TypeScript › Tsserver: Max TS Server Memory
EDIT: After some digging, I stumbled upon this issue https://github.com/microsoft/TypeScript/issues/39284. After removing Ramda from my dependencies, the performance issues went away instantly.
I'm experiencing this as well, on both general release and insiders version. I've tried all suggested solutions, including disabling automatic type acquisition, running without extensions, using the nightly TS extension, etc.
electron_node tsserver.js runs at around 100 CPU for 30 seconds - 1 minute on every minor change before eventually providing intellisense, rendering VSCode pretty much unusable for rapid Typescript development. It's only impacting one project (which isn't huge aside from a fair amount of dependencies, which I've excluded in my tsconfig). If I start a new project everything seems to work just fine.
Version: 1.47.0
Commit: d5e9aa0227e057a60c82568bf31c04730dc15dcd
Date: 2020-07-09T08:01:54.115Z (1 day ago)
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0
@RyanCavanaugh What info is needed?
@danbergelt Thanks for the tip! I am not using @types/ramda
and removing ramda
altogether is not an option as it is a downstream dependency of storybook/core
.
@elastic/charts@20.0.2
├─┬ @storybook/react@5.3.19
│ └─┬ @storybook/core@5.3.19
│ └─┬ file-system-cache@1.0.5
│ └── ramda@^0.21.0
Is this issue resolved or no one except me is facing this? I have the same issue, and it started all of a sudden, because during last year VSCode was running very smoothly, with no delays or errors at all, and yesterday it blocked the whole intellisense, autocomplete, imports, everything, it's just stuck in loading state and I can see in that electron_node tsserver
or Code Helper (Renderer)
process is taking more than 100CPU. I've tried with installing many different (older) versions of VSCode but nothing looks like it's not related with that.
Really don't know what to do, I'm on M1 Mac, project is React Native, Typescript, I have only two extensions (Eslint and Prettier), but even without them I get the same issue.
Any advices/suggestions will be appreciated a lot..
@brascene it comes and goes. Nothing I have done fixes it for good. TS4 was supposed to help but I haven't see any impact good or bad. Eslint seems to be a common denominator not sure if it's related.
Can the VSCode or TypeScript Team please put some priority into this issue which is open since 3 years? @andrewbranch @a-tarasyuk @jakebailey @sheetalkamat
Same issue. Laptop fans are constantly humming. Please look into this. One thing that helps momentarily is restarting the ts server
I commented here a while back, and what I figured out was that it wasn't an issue with VSCode version or some extension, I had a circular dependency mistake in my types.
This issue hadn't been updated in more than 2 years; it's pretty unlikely that it's still the same bug, and even so, we really need system info and a reproduction that can be used to diagnose the problem, which has so far not been provided, hence the "Needs More Info" label. Pinging us isn't going to help us figure out the problem if you also don't provide us with new info.
This issue hadn't been updated in more than 2 years; it's pretty unlikely that it's still the same bug, and even so, we really need system info and a reproduction that can be used to diagnose the problem, which has so far not been provided, hence the "Needs More Info" label. Pinging us isn't going to help us figure out the problem if you also don't provide us with new info.
What info specifically? I'm not a VSCode or extension developer. If you let me know what log files etc to share, that'd be helpful. Thanks!
Do you have a project that we can open and diagnose? Can you provide logs via https://github.com/microsoft/TypeScript/wiki/Getting-logs-from-TS-Server-in-VS-Code ?
I haven't seen this issue in a long time working daily on the same project that caused me to open this issue in the first place.
I'll keep it open as others are interacting with it but if that falls off you can close it.
@ameeli I think they are requesting more than just logs. Sounds like they want a repo they can run to troubleshoot the problem.
The repro should trigger the issue with all extensions disabled.
@ameeli the log you provided is too small that iit doesnt have any information that can be used for investigation. Please provide repro and full log to be able to investigate this
Issue Type: Bug
Within the last week I have been struggling with vscode/typescript using upwards of 100% CPU. This leads to 10-30 second delays for intellisense for trivial changes.
The main culprit appears to be
electron_node tsserver.js
.I've seen a few similar issues but none seem to get the to root of the issue, so apologies if this is a duplicate. This looks similar to https://github.com/microsoft/vscode/issues/96255 but I am experiencing this issue with all extensions disabled.
I first notice the issue using
typescript@3.8.3
. Then I tried using the nightly build per suggestion here https://github.com/microsoft/TypeScript/issues/34401#issuecomment-541947997. This worked for a day but then the issues resurfaced.Any help debugging this would be greatly appreciated.
output from
code --status
after simple code change.VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T17:07:18.473Z) OS version: Darwin x64 19.4.0
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabledflash_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)|3, 2, 2| |Memory (System)|32.00GB (0.19GB free)| |Process Argv|.| |Screen Reader|no| |VM|0%|