take too much memory
Type: Bug
tsgo seems fast on the CPU, but on my project here it take 17GB or ram. so my computer got to swap a lots, which by the end does not really make things faster
Extension version: 0.20251205.1 VS Code version: Code 1.106.3 (Universal) (bf9252a2fb45be6893dd8870c0bf37e2e1766d61, 2025-11-25T22:28:18.024Z) OS version: Darwin arm64 24.3.0 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 (8 x 2400) |
| GPU Status | 2d_canvas: enabled direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: enabled_on trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 3, 5, 5 |
| Memory (System) | 16.00GB (0.07GB free) |
| Process Argv | . --crash-reporter-id f11069fd-fef5-42de-a66b-ff89cc739130 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
aj953862:31281341
4f60g487:31327383
nes-set-on:31351930
6abeh943:31336334
cloudbuttont:31379625
todos-1:31405332
qwen_all_req:31402696
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31396818
use-responses-api:31390855
je187915:31401257
d5i5i512:31428709
ec5jj548:31422691
copilot-nes-oct-t:31418199
terminalsuggestenabled:31426255
cmp-ext-treat:31426748
cp_cls_c_966_ss:31426491
defaultvisibility:31426295
expandedtokens:31427242
c0683394:31419495
478ah919:31426797
ge8j1254_inline_auto_hint_haiku:31426888
fa76a614:31426880
5j92g670_sonnet:31426790
cp_jb_t_lixleitest:31428973
h0hdh950:31428394
Do you have a repo where this reproduces?
Do you have a repo where this reproduces?
i have the same issue with https://github.com/oven-sh/bun/
This codebase isn't in JS, so the runtime you use to run it cannot be the problem
This codebase isn't in JS, so the runtime you use to run it cannot be the problem
Its majority zig but theres still 10% js/ts code, a package.json at the root etc
i found a way to fix this the memory issue in settings "typescript.tsserver.experimental.useBundledNode": false,
i can reproduce it back and forth so tell me if you need some traces or logs or something
thanks @abelcha for the suggestion, I will try this settings !
@jakebailey sorry I am working on a private repo. what can I tell you is that is is a rather complex repo using typescript references on 5/6 projects, with at least 2 levels of references
That setting does not apply when using the native preview extension. Node is never involved in launching the language server in the new codebase. If that setting matters, I don't think you have tsgo enabled.
@jakebailey what I can also tell you is that when I was using node, I had a typescript.tsserver.maxTsServerMemory to 3GB. Is there a similar setting for tsgo ?
No, there is no equivalent to that. #1808 perhaps.
@jakebailey thanks.
I do confirm that running vscode with the GOMEMLIMIT variable set works.
After a quick walk within my project even setting it to 2048MiB seems to be enough in my case.
I'll let you know in case I see crashes or more
Actually even with GOMEMLIMIT=2048MiB, after half a day working, my tsgo would eat 13GB of ram, while I have only 6 files opened in vscode
That setting does not apply when using the native preview extension. Node is never involved in launching the language server in the new codebase. If that setting matters, I don't think you have tsgo enabled.
i swear, maybe its a cursor issue, heres the process samples normal VS with useBundledNode on and off