mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
perf(bundle): keep Zod off the first load of four eager routes
zod 4.6 grew the shared Zod chunk from 63 to 89 KB gz (the new schema compiler and its memoizer ride along because every schema goes through the `z` namespace), and the dashboard, measurements, mood and settings routes each carried it for values that need no validation. Move the measurement source list, the notes limit, the screening check and the Coach source list into value-only modules the schemas are built from, import the settings classifier and response check from their leaves, and load the gate's managed settings and anamnesis sections on demand. Re-base the four route baselines to the measured values and the aggregate cap to 4975, with the reason in the budget comment.
This commit is contained in:
1 parent
a806676a71
commit
057fd3b49c
21 files changed
+255
-192
No files matched your search
@@ -29,7 +29,7 @@ import { apiSuccess, apiError, getClientIp } from "@/lib/api-response";
|
||||
import { annotate } from "@/lib/logging/context";
|
||||
import { satisfyReminder } from "@/lib/measurement-reminders/satisfy";
|
||||
import { toMeasurementReminderDto } from "@/lib/measurement-reminders/dto";
|
||||
import { isScreeningReminderType } from "@/lib/validations/measurement-reminders";
|
||||
import { isScreeningReminderType } from "@/lib/measurement-reminders/screening";
|
||||
import { DEFAULT_TIMEZONE } from "@/lib/tz/format";
|
||||
|
||||
type RouteParams = { params: Promise<{ id: string }> };
|
||||
|
||||
@@ -15,7 +15,7 @@ import { apiSuccess, apiError, getClientIp } from "@/lib/api-response";
|
||||
import { annotate } from "@/lib/logging/context";
|
||||
import { satisfyReminder } from "@/lib/measurement-reminders/satisfy";
|
||||
import { toMeasurementReminderDto } from "@/lib/measurement-reminders/dto";
|
||||
import { isScreeningReminderType } from "@/lib/validations/measurement-reminders";
|
||||
import { isScreeningReminderType } from "@/lib/measurement-reminders/screening";
|
||||
import { DEFAULT_TIMEZONE } from "@/lib/tz/format";
|
||||
|
||||
type RouteParams = { params: Promise<{ id: string }> };
|
||||
|
||||
Reference in new issue
Block a user