Skip to content

Measure and optimize shell completion project-name latency #1074

Description

@codeforester

Finding

Bash and Zsh project-name completions invoke base-wrapper --project base base_projects list when completing project arguments. Project discovery has cache support, but completion still pays process startup and wrapper overhead.

Evidence

  • lib/shell/completions/basectl_completion.sh calls base-wrapper --project base base_projects list for project names.
  • lib/shell/completions/basectl_completion.zsh does the same.
  • This is user-facing latency on shell tab completion, so it should be measured before optimization.

Acceptance Criteria

  • Measure completion latency in a representative workspace before changing behavior.
  • Decide whether shell-session caching, a generated completion cache, or no change is warranted.
  • If optimized, keep stale project names bounded and predictable.
  • Add coverage or a lightweight smoke test for the chosen behavior.

Suggested Validation

  • Document measured before/after timings in the PR.
  • Relevant completion tests.
  • git diff --check.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions