mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The nightly discovery fan-out called isModuleEnabled per candidate user — N serial DB reads on a large instance. Resolve the opt-in gate in-memory from one findMany plus a single operator-availability read instead. The per-day backfill upserts ran one awaited statement at a time (up to 730 for a full backfill); batch each location group's upserts into a single transaction round-trip while keeping the idempotent semantics.