A fast run is mostly a run that skips work. Three jobs vx used to do on every run, and why each one went: housekeeping at exit, a walk of the shared store, and a "saved" figure that overstated what the cache saved.
Performance
Performance
Most of what makes a warm run fast is work it does not do. Recent
releases took three jobs out of every run. None of them made a run
wrong; each one made every run pay for something it did not need.
Every run ended by tidying up: it deleted run history and hash memos
older than 30 days, then applied the workspace’s retention policy to the
cache. That was seven DELETEs, four of them full scans, and their cost
grew with history. At 100,000 rows of history it was 16.7 ms of a run’s
end, against 5.4 ms without it.
A run now ends without any of it. Cleanup is one command, run when you
choose, from a cron job or a scheduled CI workflow:
Terminal window
vxcacheclean--older-than30d--max-size10G
cache.retention went with it: one cleaner is easier to reason about
than a policy that fires at the end of whichever run happens to be next.
Every run opened the shared store under ~/.vx and, because the open
looked for the wrong index file name, took it for a store it had never
seen. It then checked each entry’s directory for 14 manifest names:
14,000 file system calls at 1,000 stored entries, on every run,
no-op runs included. The fix was one file name, and an existing store
now opens without the walk.
The footer’s time row used to end with Xs saved: the stored run time
of every cache hit, added up. Hits that would have run side by side cost
the wall clock once, so the sum said more than the cache saved. A number
that flatters is worse than no number, so the row now says only what was
measured:
A daemon answers 'what changed' quickly by keeping a second copy of the truth. vx keeps no copy. Every run pays its own discovery and still wins the warm benchmarks, because the discovery was made cheap instead of being hidden.
Downloads from a remote cache used to run only as many at once as the run had workers, and uploads four at once. A transfer is a wait on a round trip, not work for a core. How vx now sizes each lane on its own, and why a missing key costs no request.
vx used to decompress an archive on every local hit. Now the local cache keeps each entry as plain files, unpacked once, and a hit is a copy the kernel does. Why the archive stays only on the wire, why a hit checks nothing, and why vx never hard-links.
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.