chore(typescript): add biome musl performance repro#12573
Open
Swimburger wants to merge 2 commits intomainfrom
Open
chore(typescript): add biome musl performance repro#12573Swimburger wants to merge 2 commits intomainfrom
Swimburger wants to merge 2 commits intomainfrom
Conversation
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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 thetraceseed SDK,biome.jsonconfig, and a minimalpackage.jsonwith only@biomejs/biomeas a dependencyREADME.md— Full write-up with benchmark results and reproduction steps!!repros/**exclusion to rootbiome.jsoncto prevent conflict between the repo's root biome config and the repro's ownbiome.json(which must have"root": trueto function as a standalone repro)Key Finding
node:22-bookworm-slim)node:22-alpine3.20)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
biome checkruns in ~119ms nativelybiome checkruns in ~1731ms in Alpine Dockerbiome checkruns in ~119ms in Debian Docker (confirming musl as root cause)Review Checklist
repros/an acceptable directory for this, or should it live in a separate repo/gist for the Biome issue?.gitignoreinsiderepros/biome-musl-perf/—node_modulescould be accidentally committed if someone runspnpm installlocally. Consider adding one.!!repros/**exclusion inbiome.jsoncmeans any future code underrepros/will be excluded from the repo-wide biome check. Acceptable as a blanket exclusion, or should it be scoped to!!repros/biome-musl-perf/**?