mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
Generate a 700k-record export.xml (~200 MB decompressed, 500k cumulative step records each carrying a fresh HKDevice runtime address, 200k interleaved spot rows) streamed into a temp stored-method ZIP — never checked in, never held in memory whole — and push it through the real extractExportXml + streamParseExportXml pipeline against a discarding Prisma stand-in. Live heap is measured after forced collections at every progress tick; the asserted growth bound (48 MiB) is a quarter of the decompressed volume. Both historical failure modes blow past it: reverting the device-address normalization retains ~61 MiB of fragmented source buckets, and unbounding the batch buffers retains ~76 MiB and starves the progress ticks. The fixed pipeline measures under 1 MiB of live growth. The suite also pins semantics alongside memory: every record read, every spot row flushed, and exactly one cumulative estimate row per day rather than one per device address. Refs #775.