-
-
Notifications
You must be signed in to change notification settings - Fork 579
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
refactor: use async thread pool #8226
Conversation
!bench |
✅ Deploy Preview for rspack canceled.
|
⏳ Triggered benchmark: Open |
a2d4250
to
9ea503e
Compare
!bench |
⏳ Triggered benchmark: Open |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["10000_development-mode + exec"] |
!bench |
📝 Benchmark detail: Open
|
!bench |
📝 Benchmark detail: Open
|
!bench |
📝 Benchmark detail: Open
|
!bench |
📝 Benchmark detail: Open
|
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["10000_development-mode + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
5150032
to
e8a33c5
Compare
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
e8a33c5
to
2830db5
Compare
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["10000_development-mode + exec","threejs_development-mode_10x_hmr + exec","threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
Threshold exceeded: ["arco-pro_production-mode_generate-package-json-webpack-plugin + exec","threejs_production-mode_10x + exec"] |
!bench |
📝 Benchmark detail: Open
|
Summary
Current Implementation Issues:
• Moves blocked tasks to other runtime threads, negatively impacting CPU affinity.
• Incurs additional costs due to task migration.
• Creates new threads for each spawn_blocking call until reaching the thread limit, potentially causing wait times and bring thread scheduler costs.
• Runs in a synchronous context, blocking the entire thread.
Proposed Solution:
This PR implements the following changes:
Key Improvements:
• CPU-bound tasks run in the main runtime thread, effectively using it as an asynchronous thread pool.
• The main thread operates in an asynchronous context, eliminating the need for block_on calls.
Future Steps:
We still have numerous blocking calls that significantly impact performance. The next phase involves migrating all blocking calls to async/await calls.
Checklist