Skip to content

Perf/ async‑find query‑refinement fast‑path#12053

Open
KRRT7 wants to merge 7 commits into
warpdotdev:masterfrom
KRRT7:perf/asyncfind
Open

Perf/ async‑find query‑refinement fast‑path#12053
KRRT7 wants to merge 7 commits into
warpdotdev:masterfrom
KRRT7:perf/asyncfind

Conversation

@KRRT7
Copy link
Copy Markdown

@KRRT7 KRRT7 commented Jun 2, 2026

The async‑find implementation is designed to run a full‑scan of every terminal block every time the user types a new search query.

This works fine for unrelated queries, but it is highly inefficient when the new query is merely a refinement of the previous one (e.g., the user types “foo” and then continues typing “foobar”).

A refinement is a strict prefix: any line that matches “foobar” must have already matched “foo”.
Because of that property we can avoid re‑scanning the whole buffer and instead:

Reuse the matches we already have – only rows that previously contained a match need to be examined again.
Skip blocks with no prior matches – if a block never contributed a match for “foo”, it cannot possibly contain a match for “foobar”.
Finish instantly when the previous result set was empty – there is nothing to rescan

@cla-bot cla-bot Bot added the cla-signed label Jun 2, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 2, 2026

@KRRT7

Every PR must be linked to a same-repo issue before Oz can review it.

Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-implement when it is ready. Once it is marked, comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jun 2, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KRRT7

Every PR must be linked to a same-repo issue before Oz can review it.

Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-implement when it is ready. Once it is marked, comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant