Search and backlinks rebuild the dirty buffer's index record on the main actor #201

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

Discussion

cmc 2026-11-22 07:11 UTC

Severity: Medium.

WorkspaceModel.overlay builds a FileRecord from the buffer's bytes whenever the text changed (Sources/OrgApp/WorkspaceModel.swift:479-488): a full parse plus semantic pass, 212 ms per MB. It is called from a view body on the Mac (Sources/Orgstar/ContentView.swift:276) and from the iOS search screen (Sources/OrgstarMobile/SearchScreen.swift:26). Build it from the existing tree off the main actor and take the search out of body.

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

Platforms: macOS, iOS.