-
-
Notifications
You must be signed in to change notification settings - Fork 746
docs: add docs about env to control working threads limit #12383
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
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📁 react-1kPath:
📁 react-5kPath:
📁 romePath:
📁 ui-componentsPath:
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 2.25KB from 47.71MB to 47.72MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12383 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for controlling worker thread counts in Rspack through a new RSPACK_WORKER_THREADS environment variable. When set, this variable configures both the tokio runtime worker threads and the rayon global thread pool to use the specified number of threads, providing users with more fine-grained control over Rspack's parallelism.
Key Changes
- Introduces the
RSPACK_WORKER_THREADSenvironment variable to configure both tokio and rayon thread pools - Refactors tokio runtime builder initialization to support conditional worker thread configuration
- Adds rayon global thread pool initialization when
RSPACK_WORKER_THREADSis set
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a14ff3d to
5cadb7c
Compare
5cadb7c to
22ff9cf
Compare
Summary
add docs about how to use env to control working threads limit
I tried to use RSPACK_WORKING_THREADS to control both rayon and tokio threads number but rayon doesn't encourge doing so rayon-rs/rayon#878 (comment)
Related links
Checklist