Skip to content

💅 noFloatingPromises is 3.89x slower in 2.5.12 on a Zod enum call #11611

Description

@jakeleventhal

Environment information

Details
CLI:
  Version: 2.5.12

Platform:
  CPU Architecture: aarch64
  OS: macos 27.0
  CPU: Apple M1 Max

Environment:
  BIOME_DISTRIBUTION: npm
  JS_RUNTIME_VERSION: v24.12.0
  JS_RUNTIME_NAME: node

Biome Configuration:
  Status: Loaded successfully
  Path: biome.json
  VCS enabled: false
  Enabled rule: nursery/noFloatingPromises

Rule name

nursery/noFloatingPromises

Playground link

https://github.com/jakeleventhal/biome-promise-rules-perf-repro

The repository pins Biome 2.5.10 and 2.5.12 side by side. Run:

bun install --frozen-lockfile
bun run bench
bun run profile:floating:2.5.10
bun run profile:floating:2.5.12

The analyzed file contains one call expression:

import { enumSchema } from "./enum-schema";

enumSchema.safeParse("one");

enumSchema is a two-value Zod 4.3.6 enum.

Five-run averages on the machine above:

Version End-to-end average noFloatingPromises rule time
2.5.10 1.470s 1.481s
2.5.12 5.712s 5.343s

That is a 3.89x end-to-end slowdown and a 3.61x increase inside the single rule invocation.

Related: #11534. That report covers a broader noFloatingPromises regression present before 2.5.12. This reproduction isolates a further regression between 2.5.10 and 2.5.12 to one imported ZodEnum.safeParse() call. Please close this as a duplicate if both cases have the same cause.

Expected result

Biome 2.5.12 should process this single call in roughly the same time as 2.5.10. noFloatingPromises should not spend more than five seconds classifying one non-Promise Zod result.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-Type-InferenceArea: type inferenceL-JavaScriptLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions