Deferred from PR #158 (CodeRabbit round one).
Week grid. hasAllDayEntries calls allDayEntries(on:) for all seven days,
allDayLane calls it again per day, and inside GeometryReader the grid runs
timed(on:) + TimelineLayout.place(...) per day. Each scans the whole
store.events array, and GeometryReader bodies re-evaluate on every geometry
change. With seven WeekTimelineView pages alive in the TabView that is ~14
full scans plus sorts per pass.
Month grid. events(on:)/tasks(on:) filter the whole array per cell —
O(cells x events) across ~42 cells, on the scroll path.
Invalidation. AnyHashable(events) / AnyHashable(tasks) rehash the full
arrays on every SwiftUI update; a revision token or counts would invalidate
without rehashing.
All three want the same shape of fix: a [Date: [...]] bucket built once
alongside the data dependency.
Deferred from the 0.9.3 promotion — these are refactors of the paths the feature
is built on, and riskier to change unreviewed than to leave.
Deferred from PR #158 (CodeRabbit round one).
Week grid.
hasAllDayEntriescallsallDayEntries(on:)for all seven days,allDayLanecalls it again per day, and insideGeometryReaderthe grid runstimed(on:)+TimelineLayout.place(...)per day. Each scans the wholestore.eventsarray, andGeometryReaderbodies re-evaluate on every geometrychange. With seven
WeekTimelineViewpages alive in theTabViewthat is ~14full scans plus sorts per pass.
Month grid.
events(on:)/tasks(on:)filter the whole array per cell —O(cells x events) across ~42 cells, on the scroll path.
Invalidation.
AnyHashable(events)/AnyHashable(tasks)rehash the fullarrays on every SwiftUI update; a revision token or counts would invalidate
without rehashing.
All three want the same shape of fix: a
[Date: [...]]bucket built oncealongside the data dependency.
Deferred from the 0.9.3 promotion — these are refactors of the paths the feature
is built on, and riskier to change unreviewed than to leave.