Skip to content

v0.2.12

@greg-flux greg-flux tagged this 13 Jun 19:39
Persist each compiled CJS module wrapper's V8 bytecode to the on-disk cache
(keyed by the exact wrapped source) and consume it on later compiles, across
isolates/workers/runs. A fresh isolate per test file otherwise re-parses and
re-compiles every required module (incl. node_modules barrels) from scratch.
Safe: V8 marks a stale/mismatched cache rejected and recompiles. On by default;
disable with TURBO_NO_CODE_CACHE; skipped under coverage.

Measured (paired interleaved A/B, jobs=8, 40-file stride sample, 20 pairs,
trimmed mean, ±0.4% control-vs-control noise floor): ui -1.3%, payroll -1.8%.
Full-suite pass/fail identical with cache on vs off (payroll 10580/1, ui 7006/0).

Also adds, for rebuild-free perf A/B sweeps: env-gated V8 flag hook
(TURBO_V8_FLAGS) and worker-count override (TURBO_JOBS); a reusable perf harness
under scripts/perf/ (micro / paired-A/B / full / profile modes) with a README;
and docs/TODO-cache-poisoning.md documenting the interrupted-bundle-write cache
poisoning bug found during this work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Assets 2
Loading