Skip to content

Comments

chore(typescript): add biome musl performance repro#12573

Open
Swimburger wants to merge 2 commits intomainfrom
devin/1771545883-biome-musl-repro
Open

chore(typescript): add biome musl performance repro#12573
Swimburger wants to merge 2 commits intomainfrom
devin/1771545883-biome-musl-repro

Conversation

@Swimburger
Copy link
Member

@Swimburger Swimburger commented Feb 20, 2026

Description

Refs: Devin run | Requested by @Swimburger

Adds a minimal, self-contained reproduction for a ~15x Biome performance regression when running on Alpine Linux (musl libc). This is intended to be shared with the Biome team as a bug report.

Changes Made

  • Added repros/biome-musl-perf/ directory containing:
    • Dockerfile — Alpine-based image (musl, slow)
    • Dockerfile.debian — Debian-based image (glibc, fast)
    • benchmark.sh — Automated comparison script (native vs Alpine vs Debian)
    • sdk/ — 322 TypeScript files from the trace seed SDK, biome.json config, and a minimal package.json with only @biomejs/biome as a dependency
    • README.md — Full write-up with benchmark results and reproduction steps
  • Added !!repros/** exclusion to root biome.jsonc to prevent conflict between the repo's root biome config and the repro's own biome.json (which must have "root": true to function as a standalone repro)

Key Finding

Environment Biome self-reported time Libc
Native Linux (host) 119ms glibc
Docker Debian (node:22-bookworm-slim) 119ms glibc
Docker Alpine (node:22-alpine3.20) 1731ms musl

The slowdown is musl-specific, not Docker overhead — the Debian container matches native. Likely caused by musl's memory allocator interacting poorly with Rust binaries (Biome is written in Rust).

Testing

  • Verified biome check runs in ~119ms natively
  • Verified biome check runs in ~1731ms in Alpine Docker
  • Verified biome check runs in ~119ms in Debian Docker (confirming musl as root cause)

Review Checklist

  • Is repros/ an acceptable directory for this, or should it live in a separate repo/gist for the Biome issue?
  • The repro includes ~322 generated TypeScript source files (~1.6 MB). Acceptable for the repo, or too much?
  • Note: no .gitignore inside repros/biome-musl-perf/node_modules could be accidentally committed if someone runs pnpm install locally. Consider adding one.
  • The benchmark script labels the host as "glibc" which may not always be accurate.
  • The !!repros/** exclusion in biome.jsonc means any future code under repros/ will be excluded from the repo-wide biome check. Acceptable as a blanket exclusion, or should it be scoped to !!repros/biome-musl-perf/**?

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant