perf: increase the default network concurrency on machines with many CPU cores#10215
Merged
perf: increase the default network concurrency on machines with many CPU cores#10215
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes network concurrency for machines with many CPU cores by replacing a simple CPU-based calculation with a worker-based scaling approach. The change exports the calcMaxWorkers() function from the worker module and uses it to compute network concurrency as a multiple of available workers, bounded between 16 and 64.
- Exports
calcMaxWorkers()from the worker module to make it reusable across packages - Updates network concurrency calculation to scale with worker count (3x workers, min 16, max 64)
- Removes the direct dependency on
osmodule in package-requester
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| worker/src/index.ts | Exports calcMaxWorkers() function with explicit return type to enable reuse in other packages |
| pkg-manager/package-requester/src/packageRequester.ts | Replaces CPU-based network concurrency calculation with worker-based scaling (3x workers, bounded 16-64) and removes unused os import |
| .changeset/small-results-hunt.md | Documents the network concurrency improvement as a minor version change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kenrick95
approved these changes
Nov 21, 2025
BlackHole1
approved these changes
Nov 21, 2025
zkochan
added a commit
that referenced
this pull request
Nov 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #10068