Skip to content

perf: optimize jump command search to single-pass algorithm #331

@kexi

Description

@kexi

Context

From PR #324 review feedback (non-blocking suggestion).

Problem

The current vibe jump search logic performs multiple passes over the worktree list:

  1. Exact match (case-sensitive)
  2. Exact match (case-insensitive)
  3. Word boundary match (case-sensitive)
  4. Word boundary match (case-insensitive)
  5. Substring match (case-sensitive)
  6. Substring match (case-insensitive)

Proposal

Optimize with a single pass that categorizes matches into buckets, then selects the highest-priority non-empty bucket.

Priority

Low — typical repositories have <10 worktrees, making the current multi-pass approach negligible in practice. This becomes relevant only for repositories with hundreds of worktrees.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions