Skip to content

rust-analyzer tries to check all crates in vscode workspace in parallel #8631

Closed
@jbg

Description

@jbg

After installing this extension for the first time, and shortly after opening a VSCode workspace with around 40-50 crates in it, my laptop becomes completely unresponsive.

Investigation shows around 200 rustc processes running. rust-analyzer seems to be running cargo check on every one of the crates in my workspace at the same time, regardless of how many crates there are and how many CPUs I have.

After killall rustc I am able to use my computer again, but when working in the workspace the problem periodically recurs.

Is there a way to limit how many cargo check processes will be run at a time? Could this default to something based on the number of CPUs the system has?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-flycheckissues with flycheck a.k.a. "check on save"A-perfperformance issuesC-enhancementCategory: enhancementE-mediumS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions