Agenda refresh stats every agenda file on the main actor #196

closed cmc opened this on 2026-11-22 07:11 UTC · feature · milestone 1 Reviews and cleanup

Discussion

cmc 2026-11-22 07:11 UTC

Severity: Medium.

AgendaModel.sources calls attributesOfItem for each agenda file before handing parsing to a detached task (Sources/OrgApp/AgendaModel.swift:187-202, call at :194). Measured 502 ms for 10,000 files, about 50 ms per 1,000, on every refresh including cache hits; refreshes come from the agenda views, sidebar, widgets and reminders. Move the stat loop into the detached task and invalidate from file events.

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

Platforms: macOS, iOS.

closed by cmc in commit 76e3cf98ba: Check the agenda files on disk off the main actor

2026-11-22 12:37 UTC