uv creator sped up thread listing ~80% by having Codex apply Tokio batch-I/O rules

charliermarsh · x · 2026-10-07

Charlie Marsh, creator of uv at Astral, shares a hands-on example of using AI coding agents for performance work: he instructed Codex to apply the rule "batch I/O in one blocking Tokio task," which surfaced major speedups across common uv workflows — thread listing got 80% faster.

Two reproducible approaches:

The PR bundles streaming ZIP extraction into one blocking task per archive with a bounded 256 KiB buffer and reuses the copy buffer across files. Cold wheel installs dropped sharply: Jupyter 2181ms → 719ms (-67%), SymPy -50%, NumPy 582ms → 381ms.

Related event: Astral's Charlie Marsh Speeds Up Codex ~80% by Teaching It Tokio Principles(3 posts)→

Original post →

More from coding & agent

coding & agent channel →