Audit finding from the improve skill (2026-06-11, commit 2818226c). Investigate-first — profile before fixing (bun run dev:analyze enables the perf HUD).
Two low-priority perf investigations
- Zero-width regex matches in workspace content search —
src-tauri/src/workspace/files/search.rs:244-251: when a match has zero width, the loop advances one char boundary at a time; a pathological user regex (^, lookarounds) on long lines could iterate excessively per line. Consider a per-line iteration cap. Effort S.
- One
git branch --show-current subprocess per sidebar workspace row — src-tauri/src/workspace/helpers.rs:82-84 carries the author's own note: TODO(perf): one git branch --show-current subprocess per row; cache by repo path with watcher invalidation if it shows up in profiles. Honor the TODO's condition: profile first; if it shows up, batch/cache by repo path with git-watcher invalidation. Effort M.
Both are LOW impact until profiling says otherwise — this issue exists so they aren't re-discovered by the next audit.
Audit finding from the improve skill (2026-06-11, commit
2818226c). Investigate-first — profile before fixing (bun run dev:analyzeenables the perf HUD).Two low-priority perf investigations
src-tauri/src/workspace/files/search.rs:244-251: when a match has zero width, the loop advances one char boundary at a time; a pathological user regex (^, lookarounds) on long lines could iterate excessively per line. Consider a per-line iteration cap. Effort S.git branch --show-currentsubprocess per sidebar workspace row —src-tauri/src/workspace/helpers.rs:82-84carries the author's own note:TODO(perf): one git branch --show-current subprocess per row; cache by repo path with watcher invalidation if it shows up in profiles.Honor the TODO's condition: profile first; if it shows up, batch/cache by repo path with git-watcher invalidation. Effort M.Both are LOW impact until profiling says otherwise — this issue exists so they aren't re-discovered by the next audit.