| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
The implementation is coherent and adequately tested; only a minor documentation overstatement remains.
Pull request overviewImproves parallel tsc -b utilization by scheduling projects according to dependency depth while preserving output order.
Changes:
| File | Description |
|---|---|
| orchestrator.go | Implements scheduling and ordered reporting. |
| buildtask.go | Replaces chained reporting synchronization. |
| graph_test.go | Verifies expected schedule orders. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
…on upstream projects Builders take projects from the topological order produced by the depth-first walk over references and block until each project's upstream is built. That order lists the whole subtree of the first reference before any sibling, so a builder that picks the root of a long chain sits idle while other builders work through the chain. Stably sort the schedule by dependency depth (projects with no upstream first), and report results from one goroutine that walks the original order so output is unchanged. A finished project releases its program before it is reported, so waiting-to-report tasks do not retain memory.
There was a problem hiding this comment.
The concurrency-sensitive orchestration changes warrant final human review despite focused graph and existing parallel-build coverage.
Review details
Sorry, something went wrong.
There was a problem hiding this comment.
The scheduling, synchronization, memory release, and test updates are internally consistent.
Review detailsNote
Copilot is running an experiment and ran this review at Balanced.
Sorry, something went wrong.
|
TypeScript Bot (@typescript-bot) perf test this faster |
Sorry, something went wrong.
|
Starting jobs; this comment will be updated as builds start and complete.
|
Sorry, something went wrong.
|
Jake Bailey (@jakebailey)
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry, something went wrong.
|
Jake Bailey (@jakebailey) I tested this branch on a large monorepo and I do see performance gains, from an median of 38.24s down to 28.39s. While memory usage did increase a bit from ~5.4GB to ~6.9GB. Most of the benchmarks used by the bot doesn't seem to use -b, where this optimization has the biggest impact. |
Sorry, something went wrong.
Yes, it's just one, xstate. |
Sorry, something went wrong.
…g comments
Compute each project's depth once and stably sort {config, depth} entries, so
the comparator no longer normalizes paths or looks up tasks on every call.
Describe depth ordering as reducing avoidable upstream blocking rather than
eliminating it: a shallower project that has been picked up may not be done
yet.
There was a problem hiding this comment.
I feel like this PR is fine, though I know we had some prior concerns about changing build order due to odd things happening. But, I think with parallel building, that ship already sailed.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #64222
tsc -b hands projects to builders in the depth-first order over references, and each builder blocks until the project's upstream is built. That order lists the whole subtree of the first reference before any sibling, so a builder that picks the root of a long chain sits idle while other builders work through the chain. On a large monorepo (19,430 composite projects, dependency graph 124 levels deep) only ~13 of 32 builders were busy on average during a cold build.
Change
Results (cold full builds of the monorepo above, --builders 8, outputs deleted before each run, 4 runs each)
CPU time is identical (~3,150 s user), so the gain comes from less builder idle time; peak RSS is ~15% higher because more builders compile at once. --verbose output of the full build is byte-identical to main after stripping timestamps (98,000 lines).
Checks: go test -p 4 ./internal/execute/..., npx hereby lint, npx hereby check:format, go mod tidy -diff pass.
Disclosure: this patch was authored with an AI coding agent (Claude Code); I directed the investigation and the change, have read and understood the diff, and will handle review feedback myself.