runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
317 stars 36 forks source link

Memory leak when used with VSCode Remote SSH #298

Open tvvignesh opened 1 year ago

tvvignesh commented 1 year ago

Hi. I develop on a remote VM using VSCode remote SSH and noticed my VM memory getting filled up frequently leading me to rebooting my VM.

When I was debugging the cause, I noticed this:

image

See process with PID 6850 which runs this command:

/home/vignesh_burdenoff_com/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/node --max-old-space-size=3072 /home/vignesh_burdenoff_com/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /tmp/vscode-typescript1944908530/bfd28f73d4ab8820f1f5/tscancellation-728e2d56e6b29221a88c.tmp* --globalPlugins ts-lit-plugin --pluginProbeLocations /home/vignesh_burdenoff_com/.vscode-server/extensions/runem.lit-plugin-1.2.4 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc

That is when I noticed that this is happening because of this lit plugin with memory spiking from 0.35GB to 2GB at its peak for the same project.

I have disabled the extension for now, but had to report it here for your reference.

This is my remote VM:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

Also tried uninstalling and reinstalling afresh again. Still have the same issue

image

jjspace commented 12 months ago

I've noticed this happening on my own system, no VM or remote SSH. The longer I have a project open the higher and higher this gets until I reload VSCode. I work on 2 large projects that are completely Lit based and this extension easily eats up 3-4 GB of memory throughout a day or two of work