Skip to content

Conversation

@hardfist
Copy link
Contributor

@hardfist hardfist commented Dec 8, 2025

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

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit ada6cd5
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/69390ecc88a811000811701d
😎 Deploy Preview https://deploy-preview-12383--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack. labels Dec 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Rsdoctor Bundle Diff Analysis

Found 5 project(s) in monorepo.

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.7 MB - -
📄 JavaScript 5.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 823.6 KB - -
📄 JavaScript 823.6 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 984.3 KB - -
📄 JavaScript 984.3 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.1 MB - -
📄 JavaScript 2.0 MB - -
🎨 CSS 83.0 KB - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

📦 Binary Size-limit

Comparing df543f0 to chore(ci): run Mac CI test on github hosted runner (#12397) by pshu

❌ Size increased by 2.25KB from 47.71MB to 47.72MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 8, 2025

CodSpeed Performance Report

Merging #12383 will not alter performance

Comparing yj/use-worker-threads (df543f0) with main (9e0280f)

Summary

✅ 17 untouched

@hardfist hardfist marked this pull request as ready for review December 10, 2025 03:07
Copilot AI review requested due to automatic review settings December 10, 2025 03:07
Copy link
Contributor

Copilot AI left a 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_THREADS environment 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_THREADS is set

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hardfist hardfist force-pushed the yj/use-worker-threads branch 2 times, most recently from a14ff3d to 5cadb7c Compare December 10, 2025 03:58
@hardfist hardfist force-pushed the yj/use-worker-threads branch from 5cadb7c to 22ff9cf Compare December 10, 2025 06:04
@hardfist hardfist changed the title feat: use RSPACK_WORKER_THREADS to controll worker threads docs: add docs about env to control working threads limit Dec 10, 2025
@github-actions github-actions bot added release: document release: document related release(mr only) and removed release: feature release: feature related release(mr only) labels Dec 10, 2025
@chenjiahan chenjiahan enabled auto-merge (squash) December 10, 2025 06:10
@chenjiahan chenjiahan merged commit 182b694 into main Dec 10, 2025
28 checks passed
@chenjiahan chenjiahan deleted the yj/use-worker-threads branch December 10, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: document release: document related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants