Skip to content

bend-lint rechecks all earlier edits for disjoint fixes in source order #2258

Backlog

Description

@oxura

What you did

Ran a bend-lint rule that reports 30,000 separate safe comment edits in source order, on a 150,067-byte valid Bend file. Timed applyFixes over the actual findings from lint. Each edit changes # ab to # xy without touching any other line.

What happened

applyFixes took 5,515 / 6,748 / 5,344 ms on this machine. The result is correct, but every edit searches all earlier accepted edits for equality and conflicts, even when it begins after all of them. #1741 already fixed copying the source per edit; this is the separate cost of selecting the edits.

The file

import Base, followed by def main() -> U32: returning 42, and then 30,000 lines of # ab. The rule scans the comment markers and proposes one safe replacement per match.

bend --version

2.0.40, main at 966bbb74.

uname -sm

Linux x86_64

clang --version (the first line)

clang version 22.1.8 (Fedora 22.1.8-4.fc44); the benchmark only needs Bun.

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