From a81dfaab3d7cf1923f9b487be71c565e1a792318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 8 Oct 2026 14:40:37 +0200 Subject: [PATCH] perf(day): leave pulse to the resting heart rate in the extremes A pulse day value is a mean over thousands of background samples, and comparing it over two years scanned every one of them: a recent day on a dense account took about 300 ms, two thirds of it here. Resting heart rate stays among the compared vitals. --- src/lib/day/notable.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/day/notable.ts b/src/lib/day/notable.ts index 3f3513a1d..527c8d60d 100644 --- a/src/lib/day/notable.ts +++ b/src/lib/day/notable.ts @@ -21,6 +21,9 @@ * * Only core types are compared for extremes: the vitals the dashboard is * built around. A watch's background figures would mark a day every week. + * Pulse is left to the resting heart rate: its day value is a mean over + * thousands of background samples, which says little as an extreme and + * costs a scan of every one of them over two years. */ import type { MeasurementType } from "@/generated/prisma/enums"; @@ -35,7 +38,6 @@ export const NOTABLE_EXTREME_TYPES: readonly MeasurementType[] = [ "WEIGHT", "BLOOD_PRESSURE_SYS", "BLOOD_PRESSURE_DIA", - "PULSE", "RESTING_HEART_RATE", "BLOOD_GLUCOSE", "HEART_RATE_VARIABILITY",