Skip to content

High memory usage for gopls #1859

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

Closed
ptrinh opened this issue Oct 27, 2021 · 3 comments
Closed

High memory usage for gopls #1859

ptrinh opened this issue Oct 27, 2021 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@ptrinh
Copy link

ptrinh commented Oct 27, 2021

Issue Type: Performance Issue

2.9 GB

Extension version: 0.28.1
VS Code version: Code 1.61.2 (6cba118ac49a1b88332f312a8f67186f7f3c1643, 2021-10-19T15:49:28.381Z)
OS version: Darwin x64 21.1.0
Restricted Mode: No

System Info
Item Value
CPUs Apple M1 (8 x 24)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 7, 5, 4
Memory (System) 16.00GB (0.02GB free)
Process Argv --crash-reporter-id acd1f8c1-0897-497f-ad80-02fedf666ed1
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
   16	   115	  7487	code main
    1	    49	  7514	   gpu-process
    0	    16	  7518	   utility
    0	   229	  7521	   window (paysiclient.go — grab-id)
    0	    98	  7560	     extensionHost
    0	  1720	  7607	       /Users/ptrinh/gopath/bin/gopls -mode=stdio
    0	    16	  7632	       /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/node/jsonServerMain --node-ipc --clientProcessId=7560
    0	    33	  7565	     watcherService
    0	    98	  7559	   shared-process
    0	    16	  7561	     ptyHost
    0	     0	  8925	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	    82	  8922	   window (Issue Reporter)
Workspace Info
|  Window (paysiclient.go — grab-id)
|    Folder (grab-id): 4396 files
|      File types: go(3670) sql(92) json(54) log(43) txt(20) md(10) sh(8)
|                  xml(7) html(7) gitignore(4)
|      Conf files:;
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
vsccppwt:30382697
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt3:30385195
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedc:30364665
pythonvspyt187:30373474
vsqsis200cf:30386380
vsaa593:30376534
vssld246:30386377

@gopherbot gopherbot added this to the Untriaged milestone Oct 27, 2021
@findleyr
Copy link
Member

Thanks for the report, and the details.

Gopls generally uses a lot of memory; this is something we know about and eventually want to mitigate. Memory scales approximately with the amount of code in the workspace. 2.9 GB is on the high side for 3670 go files, but not unheard of.

Could you please share your gopls version?

@findleyr findleyr added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 28, 2021
@ptrinh
Copy link
Author

ptrinh commented Oct 28, 2021 via email

@findleyr
Copy link
Member

Closing this as a dupe of golang/go#47855. We hope to improve gopls' memory usage in Q12022.

@golang golang locked and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants