Skip to content

Keeping Find open does not rescan the document on every frame #3280

Description

@jsmestad

Type: Bug

Severity: High. Ordinary interaction scales with document size while Find is open, even when neither text nor query has changed.

What

With a nonempty GUI search active, every semantic UI build fetches the whole document, splits its lines, allocates every match, and walks the result for the current position. Cursor-only and unrelated chrome frames repeat this work before encoder fingerprint suppression.

Why

Ordinary interaction scales with document size while Find is open, even when neither text nor query has changed.

Grounding Evidence

Verified against main@ac343a9c2bc6 on 2026-09-08.

Evidence level: Source-established work proportional to the whole document on each active-search render, with source-verified version and wire-capacity constraints for the replacement path. No end-to-end latency benchmark was run for this path.

Acceptance Criteria

  1. After the first search, cursor-only and unrelated frames perform no full-document fetch or match scan while text/query/options remain unchanged. Implemented in PR #3384.
  2. Counts, next/previous navigation, and current-match position agree with a fresh search after text edits, undo/redo, query/options changes, and buffer switches, including more than 65,535 matches without overflow or truncation. Implemented in PR #3384.
  3. Initial and replacement searches run outside latency-sensitive Editor/render callbacks. Delayed results from another query or buffer revision never publish, including undo/redo that restores an earlier version number. The toolbar distinguishes loading, rebuilding, and failure from a completed search with zero matches. Implemented in PR #3384.
  4. Ordinary line-local edits update affected results and downstream positions without rescanning unchanged document text for either literal or regex queries. Bulk edits or missing change history trigger one current asynchronous rebuild, never approximate results. Implemented in PR #3384.
  5. Large-document Release evidence reports matching work separately from render/encode work and preserves the existing search behavior. Implemented in PR #3384.

Delivery

Implemented by PR #3384.

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

    area: elixirElixir editor logicarea: performancePerformance optimizations and concurrency improvementsbugSomething isn't workingpriority: highImportant for usabilityseverity: highWrong-target changes, lost input, unusable recovery, or substantial interaction degradation

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions