mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
After an Apple Health import the worker folded the rollup table from the account's first measurement to its last, whatever the import carried, and so also folded history older than the five-year window that the boot backfill, its discovery and every read path keep to. The import now records the oldest and newest instant it wrote (`measuredSpan` on the job result), and the fold covers that span, clamped to the fold window. On the seeded account of 1.25 million rows the full fold took 12 s, the slowest statement 2.7 s against the 60 s statement limit, so this is about the window rather than time.