· via dev.to (home feed)
uv 0.13's tar-codec backend cuts 6,000-file sdist installs by a third in dev.to benchmarks
Benchmarks on dev.to find uv 0.13's new tar-codec extraction backend installs a 6,000-file sdist about a third faster, and replaces the silent dropping of unsupported archive entries with an explicit error.

uv swaps its tar backend
Astral's uv, the Rust-based tool positioned as a fast replacement for pip and virtualenv tooling, replaced the library it uses to extract .tar.gz source distributions in version 0.13.0, which shipped on 9 October 2026. The previous astral-tokio-tar code path gave way to a newer crate called tar-codec. Benchmarks published on dev.to measure what that swap buys: on a source distribution containing thousands of small files, install time drops by roughly a third.
The benchmark
According to the dev.to post, the test package contained 6,000 text files totalling 48MB uncompressed (36MB as a gzipped tarball), with a minimal setuptools-based pyproject.toml. Each install ran with --no-deps into a freshly created virtual environment and a fresh cache directory, five runs per configuration.
The medians: uv 0.13.6 with its default tar-codec backend finished in 2.53 seconds; the same 0.13.6 binary told to use the old extraction code via UV_LEGACY_TAR_BACKEND=1 took 3.55 seconds; and the actual pre-change release, 0.12.8, took 3.76 seconds. That is a 29% reduction against the same binary on the old code path, and 33% against the previous release. Comparing fastest runs instead of medians narrows the gap to roughly 18–22%, because the legacy configurations suffered occasional slow outliers. Across all fifteen runs, the new backend never finished behind the legacy path.
One detail makes the comparison clean: because the escape-hatch environment variable keeps the binary identical and toggles only the extraction code, the result isolates the backend change rather than general release-to-release improvements.
The effect also depends on scale, the post notes. An earlier attempt with 400 files and 8MB of data produced run times of 0.96 to 2.6 seconds with no clear ordering, because the fixed cost of spawning a Python subprocess to run the setuptools build swamped the extraction step. Tar extraction costs are per-entry, so packages with many small files are where the change becomes visible.
Validation gets stricter, and one silent behaviour becomes loud
The 0.13.0 release notes, as cited in the post, describe stricter validation when reading archives and warn that archives with hard links or unsupported tar extensions which older versions accepted may now be rejected. The author built four adversarial archives with Python's tarfile module to probe this: a hard link resolving outside the extraction root toward /etc/passwd, an absolute symlink to /etc/passwd, a GNU sparse entry missing its required header, and a character device node.
Three of the four were rejected by every configuration tested, including the old backend, so the path-escape defences predate 0.13. The difference there is diagnostic quality: the new errors name the exact byte offset in the archive and describe the offending entry, where the old ones ended in a bare "Invalid argument" from the operating system.
The character device is the genuine behaviour change. uv 0.13.6's default backend refuses the entire install, naming the unsupported member type. With the legacy flag set, or on 0.12.8, the same archive installs and reports success, but the device entry is quietly skipped: it never appears in site-packages and produces no warning. The practical shift is from a silent truncation of package contents to an explicit failure.
The post also documents a near-miss in its own testing: a check of legitimate hard links appeared to pass until the author noticed the expected files were missing from the installed package. The cause turned out to be setuptools packaging only .py files without an explicit manifest, not the extraction step.
One-time upgrade cost
The 0.13.0 changelog notes that the cache entry format changed and that dependencies may be downloaded or rebuilt after upgrading. The post confirms this: pointing 0.13.6 at a cache populated by 0.12.8 caused an identical, already-built tarball to be treated as uncached and rebuilt, with the cache directory growing from 52MB to 104MB rather than being reused.
Why it matters
Speed is uv's core pitch, and this is a concrete, isolated win, though only for source distributions large enough for extraction overhead to matter. The more consequential change may be correctness: an installer that reports success while silently dropping archive entries leaves the environment in a state that does not match what the package shipped. Teams relying on warm caches in CI should expect a one-time rebuild after upgrading, and UV_LEGACY_TAR_BACKEND=1 exists as an escape hatch for legitimate archives that the stricter validation now refuses.
- #python
- #uv
- #package-management
- #benchmarks
- #astral