Skip to content

CPU usage at 100 % when workspace has many independent projects #14495

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
tsoernes opened this issue Apr 5, 2023 · 1 comment
Closed

CPU usage at 100 % when workspace has many independent projects #14495

tsoernes opened this issue Apr 5, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@tsoernes
Copy link

tsoernes commented Apr 5, 2023

I have emacs set up with rust-analyzer.

On startup it says:
LSP :: rust-analyzer:612877 initialized successfully in folders: (/home/torstein/code/exercism)
which is the projectile root, and contains like 30 cargo projects, but it is not the cargo root of the project.
The cargo root of the project is very small in size, and has root directory /home/torstein/code/exercism/bowling, which in turn contains the only opened file /home/torstein/code/exercism/bowling/src/lib.rs,

I have an issue where 2 instances of rust-analyzer launches, consume 100% CPU each, and never finishes, even after many hours.
rust-analyzer version: rust-analyzer 1.68.0
rustc version: rustc 1.68.0 (2c8cc3432 2023-03-06) (Fedora 1.68.0-1.fc37)

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)

@tsoernes tsoernes added the C-bug Category: bug label Apr 5, 2023
@flodiebold
Copy link
Member

This is #8631. rust-analyzer will eagerly analyze and run cargo check for all projects in your workspace right now. I'd recommend choosing the actual project folders as the LSP workspace. You could also probably get better startup performance by turning off rust-analyzer.cachePriming.enable.

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

No branches or pull requests

2 participants