Skip to content

Perpetual notifications with 100% CPU & RAM usage #148

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

Open
ppelikan opened this issue Mar 23, 2025 · 5 comments
Open

Perpetual notifications with 100% CPU & RAM usage #148

ppelikan opened this issue Mar 23, 2025 · 5 comments

Comments

@ppelikan
Copy link

ppelikan commented Mar 23, 2025

Hello,

I am constantly seeing this distracting message with animation:
Image

When clicked, there are multiple notifications:
Image

Steps to reproduce:

  1. Open one or more Nim source code file in VS Code
  2. Observe CPU usage jump to 100% (caused by multiple nimsuggest processes)
  3. After few minutes CPU usage drops, and the never-ending notification appears.

Apparently, the time of high CPU consumption depends on how big the import'ed codebase is in the project we open, but it's hard for me to say that for sure.

Also sometimes I get OOM error - all RAM is being taken when working with this setup.

My setup

Laptop:
OS: Manjaro Linux x86_64
Kernel: 6.12.19-1-MANJARO
CPU: Intel i5-9400H (8 cores, 16 threads)
RAM: 32GB

Nim:
Nim Compiler Version 2.2.2 [Linux: amd64] Compiled at 2025-02-06 git hash: 6c34f62785263ad412f662f3e4e4bf8d8751d113
nimlangserver 1.10.0

I have installed nim via choosenim, and manually downloaded release build of nimlangserver from github.

nim-lang.org VS Code plugin - latest version (2025-03-19, 13:00:10).

The only plugin settings I have, is:
"nim.lintOnSave": true,
Setting the "nim.project" or removing it, doesn't influence the problem.

@ppelikan ppelikan changed the title Never ending "Checking project /path/to/file.nim" animation Never ending "Checking project: file.nim" animation Mar 23, 2025
@ppelikan ppelikan changed the title Never ending "Checking project: file.nim" animation Perpetual notifications with 100% CPU & RAM usage Mar 23, 2025
@RokkuCode
Copy link

The nimlangserver has problems when using with choosenim: nim-lang/langserver#184

But without using choosenim the problem exists, too.

@ppelikan
Copy link
Author

ppelikan commented Mar 23, 2025

Yes, I had much more problems, when I allowed vscode-nim extenstion to automatically install the nimlangserver. (First, it tried to build it from source instead of getting binaries)

So I just:

  1. downloaded the built release from langserver/releases
  2. then placed the executable in the ~/.nimble/bin/ directory (same directory, where nim is installed, but any PATH dir should work as I assume)

In this configuration, it behaves similarly to when I installed Nim with system package manager (on my previous PC) and this very problem occurs.

@RokkuCode
Copy link

yes thats right. I have the same problems. please enable in the vscode nim extension setting "nimlangserver > trace: server" to verbose and post the informations from "output" (there is a filter dropdown in the output panel "nim lsp". then you should see the messages)

@1c3c0l4
Copy link

1c3c0l4 commented Mar 31, 2025

I run into the same problem on Windows 11. The vscode plugin creates many nimsuggest process and takes almost 100% cpu and memory. I have to kill all the nimsuggest process regularly. This makes a really bad experience.

@xix-xeaon
Copy link

I also have the problem with lots of nimsuggest processes and extreme RAM usage (and CPU). My project (which isn't even big in any sense) is becoming too large to open unless I close everything else down first. Or, suddenly the computer freezes because I ran out of RAM as nimsuggest has been slowly growing and is now over 10 GB, which is insanely crazy.

However, I've had the most wonderful experience this past week! There was a "communication" error or something and the extension failed to start any nimsuggest processes and hasn't tried again. Some features are missing but I had nim check on save enabled and I'm not missing anything else nearly as much as I enjoy not having to deal with OOM issues.

Please add a setting to completely disable nimsuggest!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants