mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
A full-history backfill read every heart-rate point of an account into one array, mapped it into a second, and wrote the lot in one call; the cycle's deferred-rollup ledger then kept one entry per written reading. On a watch that records a reading a minute that is over a million points, and the backfill ran a 1 GB heap out of memory within seconds, restarting the instance it shares with the app (#1023). The metric walk now hands each page to its write before requesting the next, and both the Google Health and Fitbit ledgers collapse to one key per touched type-day as they record. The heart-rate walk's page ceiling rises from 1000 to 10000: at one point a minute the old ceiling is under two years, a longer history always ended truncated, and the backfill retried the whole walk on every attempt and every boot without completing.