Skip to content

Add helm-projectile-find-file-strategy for streaming#207

Merged
bbatsov merged 1 commit into
masterfrom
prototype-streaming-strategy
Jul 1, 2026
Merged

Add helm-projectile-find-file-strategy for streaming#207
bbatsov merged 1 commit into
masterfrom
prototype-streaming-strategy

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 1, 2026

Copy link
Copy Markdown
Owner

helm-projectile-find-file builds the whole project file index up front, which is slow to appear on large or remote projects. Streaming already exists as the separate helm-projectile-find-file-streaming command, but you had to relearn the command name to get it.

This adds a helm-projectile-find-file-strategy option. Set it to streaming and helm-projectile-find-file (plus its other-window and other-frame variants) streams candidates as Projectile's indexing command lists them. It's read on each call, so toggling takes effect immediately. Defaults to sync, the original behavior, so nothing changes out of the box.

The find-file-dwim commands and find-file-in-known-projects stay sync on purpose: they need the full file list by nature (to match the file at point, or to span every known project). The streaming source is factored into a small builder so the window/frame variants reuse it with the right default action.

Tests cover the dispatch for all three variants under both strategies, plus the new variant sources and their default actions.

  • The commits are consistent with our contribution guidelines
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog
  • You've updated the readme

`helm-projectile-find-file' builds the whole file index up front before
the picker appears, which is slow on large or remote projects. Streaming
already exists as a separate `helm-projectile-find-file-streaming'
command, but you had to relearn the command name to use it.

Add a `helm-projectile-find-file-strategy' option; set it to `streaming'
and `helm-projectile-find-file' - along with its other-window and
other-frame variants - streams candidates as Projectile's indexing
command lists them. The strategy is read on each call, so toggling it
takes effect immediately. Defaults to `sync', the original behavior.

The dwim commands and `helm-projectile-find-file-in-known-projects' stay
sync: they need the full file list by nature (to match the file at point,
or to span every known project).

Factor the streaming source into `helm-projectile--make-streaming-source'
so the other-window/other-frame variants reuse it with the right default
action.
@bbatsov bbatsov merged commit 5bb76eb into master Jul 1, 2026
10 checks passed
@bbatsov bbatsov deleted the prototype-streaming-strategy branch July 1, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant