mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Reviewer note: src/app/api/analytics/route.ts fanned out 17+ unbounded prisma.measurement.findMany per request — growth linear in HealthKit-days. Replace with prisma.groupBy where possible; chunked-paged with take=5000 where running-window slope or paired correlations require row-level access. Wide-event annotation analytics.bp_aggregate.row_count for slow-query attribution. Fixes: Sr-H1 (Wave-6 v1.4.23 senior-dev review) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>