Skip to content

A multi-file bend-lint fix preview rescans every edit for every file #2292

Backlog

Description

@oxura

What you did

Called the public render(diag) with one diagnostic that has one safe fix spanning generated modules. Each module has # original as its first line. The rule returns four adjacent one-character replacements per file, interleaving the files by offset.

What happened

The preview scans the full edit list once per source. With 1,024 files (4,096 edits), render took 19 ms median over three runs; with 4,096 files (16,384 edits), it took 168 ms. Output order and patch hunks should stay the same if edits are grouped once, by first occurrence of their source. This happens in preview rendering, not in fix validation (#2283) or in --fix selection (#2258).

bend --version

Bend 2.0.40, upstream 966bbb7435, Bun 1.4.4.

uname -sm

Linux x86_64.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions