Repository navigation
v1.23.41
-
The daemon no longer scans the whole search index after every indexing pass. The check that decides whether the session search index needs compacting counted every row of FTS5's
_datatable, which is one row per index page, not one per segment. On one Mac that was 809,183 rows in 3 GB against 14 real segments, so the 512-segment threshold was always crossed: each pass ran two full scans of that table (1 to 2 s each with the machine idle, far longer under load) plus amerge, all on the daemon's main thread. Asampleof the daemon showed 71% of its main thread in that count, its event loop was stalled 36 to 56 minutes of every hour, and the watchdog restarted it 57 times in a day. The count now reads the segment total FTS5 keeps in its structure record: 0.03 ms on the same index, and no merge while it is healthy.agents daemon index optimizereports the same real segment counts. Source:cli/src/lib/session/db.ts -
The daemon no longer restarts every few minutes on a Mac with many screen recordings. Every 2 seconds the
recordingswatcher looked up a session for each recording sincewatchedSince, one full live-session scan per file and all at once, and repeated it on every tick for any file with no single matching session. On a laptop with 77 recordings that meant 77 parallel scans every tick (ps,lsofandtmuxper live session), event-loop stalls of 25 to 68 s, and 57 daemon restarts in a day asattention-notifyran past its hang limit. A scan now reads live sessions at most once, only when it finds a new file, and a file's lookup is never repeated, including when it matched no session. Source:cli/src/lib/recordings/settle.ts.