When more tasks are ready than workers, a runner has to pick. Five rules for picking, the graphs where each one wins and loses, measured with vx, and why recorded timings beat every rule that has to guess.
Performance
Performance
When more tasks are ready than workers, the pick can change a run’s wall
time by a third. Every rule without timings loses on some graph.
Recorded timings found the best order in every case we measured.
The task at the head of the longest path in seconds
Yes
The last one is the
@vzn/vx-history plugin.
It is off by default. With equal tasks, vx’s default lands close to
longest path first. Real tasks are not equal.
The best order starts the 60-second task at once. Counting dependents
starts both parents first, since the long task has nothing after it:
Order
Worker 1
Worker 2
Best: 60 s in all
long
parent → parent → child → child
vx default: 90 s in all
parent → long
parent → child → child
Measured with vx, two workers:
Wall time
Ready order60.2 s
Most direct dependents60.2 sa tie, settled by ready order
Most transitive dependents (vx’s default)90.0 s
Critical path by step count89.9 s
Recorded time, run 1 (no history yet)90.0 s
Recorded time, runs 2 and 360.2 s, 60.2 s
The table
Rule
Wall time
Ready order
60.2 s
Most direct dependents
60.2 s (a tie, settled by ready order)
Most transitive dependents (vx’s default)
90.0 s
Critical path by step count
89.9 s
Recorded time, run 1 (no history yet)
90.0 s
Recorded time, runs 2 and 3
60.2 s, 60.2 s
vx’s default takes 30 s longer here. In a real repo this is a slow
lint or unit test that needs no build. Ready order won only
because the long task was first in line.
1,090 packages, 3,270 tasks, 100 layers, every task 1 second, 10
workers. The best possible run is 218 seconds.
Wall time
Ready order301.7 s
Most direct dependents220.5 s
Most transitive dependents (vx’s default)220.4 s
Critical path by step count220.6 s
Recorded time, runs 1 to 3220.6 s, 220.5 s, 220.5 s
The table
Rule
Wall time
Ready order
301.7 s
Most direct dependents
220.5 s
Most transitive dependents (vx’s default)
220.4 s
Critical path by step count
220.6 s
Recorded time, runs 1 to 3
220.6 s, 220.5 s, 220.5 s
Every rule that reads the graph lands within 3 seconds of the best.
Ready order takes 81 s longer. With equal tasks, the shape is all there
is to know, so history adds nothing.
Cases 1 and 2 are mirror images. Shape alone cannot tell a 60-second
task from a 2-second one, so any shape rule loses one of them.
The history plugin ranks each task by its recorded time plus the longest
path behind it. From the second run on, it found the best order in
every case. So vx ships no more guessing rules.
Before there is any history, one line in .vx/workspace.ts picks the
rule vx guesses with:
.vx/workspace.ts
exportdefault {
run: { schedule: 'critical-path' },
}
run.schedule
Starts first
most-work (default)
The task the most work waits on, at any depth
critical-path
The task at the head of the longest path of tasks
direct-dependents
The task the most tasks wait on directly
ready-order
The task that became ready first
A schedule plugin still ranks first. The rule breaks its ties. A slow
e2e starting late? Try ready-order. Long paths finishing last?
Try critical-path.
It learns from the last 20 local runs. A plugin can also read timings
from a shared store and rank with core’s criticalPath.
How we measured: every task is a sleep · linux x64, 4 cores, Bun 1.4.2 · vx a85223a, one cold run (--force) per row · 2026-10-09 · rules other than the default and history are small schedule plugins · Cases 1 and 2 end in one group task, so “most direct dependents” ties and falls back to ready order · each history arm starts empty
vx DTE's planner was a pile of greedy rules that fought each other. One engine with one objective replaced them. Full runs of vx's own CI went from about 40 s past their ideal to 9 to 19 s.
Execution
DTE workers that fit the work, and a footer that says how full they ran
vx DTE puts each task on a machine type that can run it, books it by its measured memory peak and CPU, stops a server once nothing needs it, and prints how busy every worker was.
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.