Commit 09d18df
Fix search performance regression and TUI race condition (#262)
Tested and ran into a bunch of performance & context issues that
surfaced in the TUI. Original approach using ILIKE is better it seems
like for large archives. (Note this is a resubmission of #256)
Changes
- Reverts DuckDB text search from regexp_matches to ILIKE — regexp
caused significant performance regression on Parquet scans. ILIKE is
natively optimized by DuckDB for columnar data. FTS5 deep search path is
unchanged.
- Fixes a TUI race condition where pressing a (all messages) then
quickly searching could cause the stale loadMessages response to
overwrite search results. Search now invalidates pending loads via
loadRequestID.
- Fixes a placeholder/arg count drift in buildStatsSearchConditions —
text terms emit 4 args each (subject + snippet + 2 sender) but the
arg-slicing helper assumed 3. Extracted buildNonTextSearchConditions to
eliminate the brittle offset math entirely. Regression tests lock the
placeholder invariant across both search builders.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com>1 parent 82b1498 commit 09d18df
File tree
6 files changed
+792
-107
lines changed- internal
- query
- tui
6 files changed
+792
-107
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
0 commit comments