Skip to content

🐛 nursery/noMisusedPromises is ~2x slower in 2.5.6 than in 2.5.1 #11223

Description

@staskorz

Environment information

Details
$ ./node_modules/biome-2-5-6/bin/biome rage --linter --config-path=biome.with-rule.jsonc
CLI:
  Version:                      2.5.6
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_DISTRIBUTION:                npm
  BIOME_LOG_PATH:                    unset
  BIOME_LOG_PREFIX_NAME:             unset
  BIOME_LOG_LEVEL:                   unset
  BIOME_LOG_KIND:                    unset
  BIOME_CONFIG_PATH:                 unset
  BIOME_THREADS:                     unset
  BIOME_WATCHER_KIND:                unset
  BIOME_WATCHER_POLLING_INTERVAL:    unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v24.18.1
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully.
  Path:                         biome.with-rule.jsonc
  Formatter enabled:            false
  Linter enabled:               true
  Assist enabled:               false
  VCS enabled:                  false
  HTML full support enabled:    unset

Linter:
  JavaScript enabled:           unset
  JSON enabled:                 unset
  CSS enabled:                  unset
  GraphQL enabled:              unset
  Recommended:                  unset
  Enabled rules:
    nursery/noMisusedPromises

Workspace:
  Open Documents:               0

What happened?

biome check with nursery/noMisusedPromises enabled is about twice as expensive in 2.5.6 as in 2.5.1. #11035 fixed most of the regression introduced in 2.5.4, but the rule has not returned to its 2.5.1 cost.

Reproduction: https://github.com/staskorz/biome-no-misused-promises-perf-repropnpm install then pnpm bench.

400 generated files (~4000 async class methods). Both versions are aliased devDependencies running against the same tree; the two configs are identical except that one enables the rule. biome check reports no diagnostics, so this measures analysis time only. Best of 3 (Ryzen 7 7700X):

biome rule on rule off rule cost
2.5.1 255 ms 129 ms 125 ms
2.5.6 364 ms 128 ms 236 ms

The rule-off baseline is identical across versions, so the whole difference is in the rule. On the same workload 2.5.4 takes 22.1 s and 2.5.5 takes 372 ms.

Two observations that may narrow it down:

  • The gap shows on async class methods calling each other through this; plain top-level async functions barely differ between versions — roughly the area touched by the 2.5.5 overload-selection changes.
  • From --log-level=tracing (summed time.busy): update_module_graph_internal 1197 ms → 1372 ms. I couldn't attribute the rest because 2.5.6 emits no pull_diagnostics spans (2.5.1: 400 spans / 852 ms), which also makes that step of the investigating-slowness guide unusable on 2.5.6. tracing.json attached for both.

tracing-2.5.1.json
tracing-2.5.6.json

Tested against the latest published release (2.5.6); I have not built main from source.

Expected result

With the rule enabled, biome check should cost roughly what it did in 2.5.1 (~125 ms here, not ~236 ms).

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-Type-InferenceArea: type inferenceS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions