Skip to content

v1.23.41

Choose a tag to compare

@github-actions github-actions released this 20 Oct 05:48
· 32 commits to main since this release
  • 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 _data table, 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 a merge, all on the daemon's main thread. A sample of 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 optimize reports 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 recordings watcher looked up a session for each recording since watchedSince, 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, lsof and tmux per live session), event-loop stalls of 25 to 68 s, and 57 daemon restarts in a day as attention-notify ran 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.