Skip to content
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

flycheck: add option to set lower priority #11352

Open
Tracked by #86
ShadowJonathan opened this issue Jan 27, 2022 · 6 comments
Open
Tracked by #86

flycheck: add option to set lower priority #11352

ShadowJonathan opened this issue Jan 27, 2022 · 6 comments
Labels
A-diagnostics diagnostics / error reporting C-feature Category: feature request E-easy S-actionable Someone could pick this issue up and work on it right now

Comments

@ShadowJonathan
Copy link

Often enough i have large projects where cargo check takes a long time, I switch away to do some other things while it churns away, but often enough my PC is slowed down to a crawl due to cargo being CPU-heavy.

I'd like to have the ability to have rust-analyzer put cargo on a higher nice value (lower priority), so it doesn't affect a lot of other things on my PC

@lnicola
Copy link
Member

lnicola commented Jan 27, 2022

After the project is loaded, the only cargo command is cargo check, which you can override. If you're on Linux, you can put nice in there.

@ShadowJonathan
Copy link
Author

How exactly? I looked at the config page, but i didn't see this.

@lnicola
Copy link
Member

lnicola commented Jan 27, 2022

    "rust-analyzer.checkOnSave.overrideCommand": [
        "nice",
        "-n2",
        "cargo",
        "check",
        "--all-targets",
        "--message-format=json"
    ]

@ShadowJonathan
Copy link
Author

ah, thanks, then this issue can be closed

@lnicola
Copy link
Member

lnicola commented Jan 27, 2022

It's a reasonable feature request, but we generally avoid platform-specific code, so I'm not sure we'd want to implement this across the platforms where there's an API for it. Windows has it, but on Unix I think we'd have to call nice in pre_exec.

@ShadowJonathan
Copy link
Author

maybe something like low_priority: true?

@ShadowJonathan ShadowJonathan changed the title [feature] Ability to set nice value on cargo commands ran by rust-analyzer Ability to make cargo run on lower process priority Jan 27, 2022
@lnicola lnicola changed the title Ability to make cargo run on lower process priority flycheck: add option to set lower priority Jan 27, 2022
@lnicola lnicola added A-diagnostics diagnostics / error reporting C-feature Category: feature request S-actionable Someone could pick this issue up and work on it right now E-easy labels Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting C-feature Category: feature request E-easy S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

2 participants