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

📎 Add a cli argument to limit worker thread count #5124

Open
dyc3 opened this issue Feb 14, 2025 · 2 comments
Open

📎 Add a cli argument to limit worker thread count #5124

dyc3 opened this issue Feb 14, 2025 · 2 comments
Labels
A-CLI Area: CLI S-Feature Status: new feature to implement S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@dyc3
Copy link
Contributor

dyc3 commented Feb 14, 2025

Description

Add a cli flag to set the limit of threads Biome uses to do work. This should only be applicable when using the ci command.

Suggested flag names: --threads, --workers

Discussed briefly in #5097. Note that the environment variable RAYON_NUM_THREADS can already do this, but this is a feature of rayon, not something we own ourselves, and therefore not really discoverable by users.

@dyc3 dyc3 added A-CLI Area: CLI S-Feature Status: new feature to implement labels Feb 14, 2025
@ematipico ematipico added the S-Help-wanted Status: you're familiar with the code base and want to help the project label Feb 14, 2025
@arendjr
Copy link
Contributor

arendjr commented Feb 16, 2025

This should only be applicable when using the ci command.

What’s the rationale behind this restriction? I could very well see a desire to add the same feature to the LSP/daemon to prevent overloading someone’s workstation, for instance. And the same reasoning could be applied for running individual non-CI commands too.

Of course it’s fine if we simply tackle the CI use case first if that’s less work.

@ematipico
Copy link
Member

Until now, four people requested such a feature, and it was always for CI environments with limited resources.

Since the request was coming from a specific need, I feel it makes sense to implement it in CI only, because we can justify it for a real case requested by users.

At the moment, since no user requested the feature for "not overloading the workstation", I think it doesn't make sense to implement it because we can't justify a real, requested use case. (The WASM distribution falls back to one thread by default I think)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI S-Feature Status: new feature to implement S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

No branches or pull requests

3 participants