Index build is one transaction on a queue that blocks readers #200

open cmc opened this on 2026-11-22 07:11 UTC · feature · milestone Backlog

Discussion

cmc 2026-11-22 07:11 UTC

Severity: Medium.

Reconciler keeps every file's bytes and record in memory and applies them in one transaction (Sources/OrgWorkspace/Reconciler.swift:69-130, Sources/OrgIndex/IndexStore.swift:201-218); the store is a DatabaseQueue in delete journal mode (:76-80). 10,000 files: 11.8 s single-threaded, +249 MB, with search and the file list waiting. Commit in batches, use DatabasePool with WAL, parse concurrently.

From the performance review, docs/review-2026-11-21.md (#96).

Platforms: macOS, iOS.