-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nimsuggest devours CPU usage #11679
Comments
Are you using VS Code? If so that's the fault of the VS code Nim extension. It spawns Nimsuggest far too aggressively. |
I don't think VS Code has anything to do, I mean it might be aggressive but here we are talking of full CPU spinning.. there has to be something wrong. |
There are multiple issues with nimsuggest.
|
The only way to make nimsuggest work for me in the large project is to spawn nimsuggest as aggressively as possible and then kill it every 3 minutes. Only them I can get any suggestions out of nimsuggest. Patterns when nimsuggest eats up a lot of memory or CPU time when left alive for sometime I have seen countless times. |
Just to be clear: I'm not excusing nimsuggest here. But the way the VS Code extension launches nimsuggest is incredibly infuriating. We should move to a Language Server that can manage nimsuggest instances in a sane manner. |
btw for some reason it's not happening anymore lately! |
JFYI setting nim.project in the workspace config helps:
|
Hi, nimsuggest (spawned by vscode-nim) just ate 4 GB of RAM on my Windows 7 and constantly uses 100% of one of the cores. So is there some memory leak, that should be fixed? |
@sinkingsugar might be related to #11849. That caused infinite loop in macros. @anurbol, it's probably not a memory leak as CPU usage is high as well, probably loop that keeps burning CPUs and allocating, in a similar vein to #11849. Anyway that's what this issue is tracking. |
This issue still persists, I have noticed when working with HTTP server, if there is an issue in the code the |
Yes, I have it quite often as well, and I'm not working with macros or a heavy generics codebase. |
nimsuggest uses 100% cpu for me very regularly. here's one way to replicate: proc bar(k:static bool):SomeNumber = (when k: 3, else: 3.0) running i thought |
I am also experiencing this issue in VSCode on MacOS. I believe I am on the latest version of the VSCode Nim plugin, VSCodium (open source vscode), and Nim. |
nimsuggest
is consuming too much of CPU, fans have not stopped since I installed it via choosenim. In fact it uses more CPU than any other process.The text was updated successfully, but these errors were encountered: