Marc-André Bombeck
f5d6710670
perf(analytics): keep closed blocks of past readings cached across syncs
...
Every sync marked all of an account's analytics cells stale, so the slice
re-read the pre-fold remainder (every reading older than five years,
folded per source and day, the slice's largest statement on a long
history) and the day view re-read its past history blocks, although a
sync of today's readings cannot change either.
A cache key can now name the instant its value's readings end before
(closedBlockKeyPart). invalidateUserMeasurements takes touchedFrom, the
earliest measuredAt a write created, changed or removed, and leaves such
blocks in place when it is not earlier; without it every block goes as
before. The batch route passes it from the identities it wrote. The
pre-fold remainder moves into its own module and is cached as a closed
block; the day view's past history blocks carry their end, with a day of
margin for a night across midnight.
The batch route's two up-front reads move into batch-stored-rows.ts with
the once-per-batch key rule they share.
2026-10-22 07:24:59 +02:00
..
2026-10-20 09:08:40 +02:00
2026-10-22 07:24:59 +02:00
2026-10-22 04:29:47 +02:00
2026-10-08 10:32:11 +02:00
2026-10-08 11:18:14 +02:00
2026-08-08 01:05:31 +02:00
2026-10-15 12:23:09 +02:00
2026-10-02 23:03:45 +02:00
2026-10-20 14:13:44 +02:00
2026-09-26 20:27:53 +02:00
2026-10-21 20:51:13 +02:00
2026-07-26 22:27:48 +02:00
2026-10-21 19:43:02 +02:00
2026-10-06 19:57:04 +02:00
2026-10-06 19:26:30 +02:00
2026-10-21 22:13:28 +02:00
2026-08-14 02:34:40 +02:00
2026-09-26 16:31:03 +02:00
2026-10-22 04:29:35 +02:00
2026-10-21 19:53:57 +02:00
2026-10-06 20:14:11 +02:00
2026-09-09 22:39:39 +02:00
2026-10-03 20:45:02 +02:00
2026-09-25 07:39:06 +02:00
2026-10-04 18:23:14 +02:00
2026-10-20 13:53:54 +02:00
2026-10-04 10:37:23 +02:00
2026-10-20 06:49:17 +02:00
2026-10-20 14:04:06 +02:00
2026-10-20 10:06:11 +02:00
2026-10-15 21:31:50 +02:00
2026-10-22 01:36:06 +02:00
2026-10-16 00:18:35 +02:00
2026-10-06 21:24:24 +02:00
2026-10-06 18:39:50 +02:00
2026-10-04 20:00:07 +02:00
2026-10-01 10:52:48 +02:00
2026-10-19 11:06:55 +02:00
2026-09-03 05:09:00 +02:00
2026-10-09 13:13:26 +02:00
2026-10-21 12:02:13 +02:00
2026-10-16 17:11:04 +02:00
2026-10-15 15:12:57 +02:00
2026-10-16 03:39:40 +02:00
2026-10-19 11:06:55 +02:00
2026-10-20 09:51:12 +02:00
2026-10-21 19:43:02 +02:00
2026-08-01 10:45:24 +02:00
2026-08-02 16:21:19 +02:00
2026-10-15 15:06:03 +02:00
2026-10-20 20:27:32 +02:00
2026-09-09 23:03:38 +02:00
2026-10-20 09:08:40 +02:00
2026-09-16 13:05:14 +02:00
2026-10-08 14:27:02 +02:00
2026-10-16 03:57:45 +02:00
2026-10-16 01:20:53 +02:00
2026-10-16 01:20:53 +02:00
2026-10-20 20:27:32 +02:00
2026-09-03 01:42:16 +02:00
2026-10-16 03:57:46 +02:00
2026-10-19 18:56:06 +02:00
2026-10-08 18:45:01 +02:00
2026-10-21 20:51:39 +02:00
2026-10-21 21:39:15 +02:00
2026-10-01 09:17:44 +02:00
2026-10-21 21:55:57 +02:00
2026-09-26 13:13:51 +02:00
2026-09-10 11:16:55 +02:00
2026-10-20 09:51:12 +02:00
2026-10-19 11:06:55 +02:00
2026-09-27 04:48:08 +02:00
2026-09-15 14:39:09 +02:00
2026-08-02 16:21:19 +02:00
2026-08-02 16:49:47 +02:00
2026-10-20 16:45:11 +02:00
2026-09-26 10:01:27 +02:00
2026-09-26 17:08:47 +02:00
2026-10-15 21:48:57 +02:00
2026-09-10 08:31:44 +02:00
2026-10-15 22:31:51 +02:00
2026-10-16 00:58:48 +02:00
2026-08-02 16:21:19 +02:00
2026-09-26 19:54:38 +02:00
2026-09-24 10:52:04 +02:00
2026-09-03 05:49:18 +02:00
2026-10-08 09:54:42 +02:00
2026-08-06 05:44:41 +02:00
2026-08-06 05:23:38 +02:00
2026-08-30 14:16:33 +02:00
2026-10-21 22:03:48 +02:00
2026-10-21 22:00:41 +02:00
2026-08-02 16:21:19 +02:00
2026-10-09 13:13:26 +02:00
2026-10-20 09:08:40 +02:00
2026-10-21 21:55:57 +02:00
2026-10-09 17:25:50 +02:00
2026-07-25 16:23:58 +02:00
2026-10-08 22:37:57 +02:00
2026-09-10 05:25:30 +02:00
2026-10-22 04:29:57 +02:00
2026-10-20 13:03:15 +02:00
2026-10-21 19:24:21 +02:00
2026-10-19 11:06:55 +02:00
2026-10-19 14:57:00 +02:00
2026-09-01 21:00:12 +02:00
2026-10-15 15:06:03 +02:00
2026-10-22 05:30:00 +02:00
2026-08-02 16:21:19 +02:00
2026-09-02 10:44:04 +02:00
2026-10-20 11:06:17 +02:00
2026-10-08 09:05:54 +02:00
2026-10-03 23:32:07 +02:00
2026-10-20 10:17:01 +02:00
2026-10-20 10:01:30 +02:00
2026-10-20 10:58:03 +02:00
2026-10-20 14:06:43 +02:00
2026-09-10 07:26:32 +02:00
2026-10-19 11:06:55 +02:00
2026-08-07 05:43:06 +02:00
2026-10-21 19:43:02 +02:00
2026-07-28 21:11:43 +02:00
2026-10-01 10:52:48 +02:00
2026-09-02 12:08:38 +02:00
2026-10-21 20:51:29 +02:00
2026-10-21 20:51:29 +02:00
2026-10-15 23:29:40 +02:00
2026-10-21 22:17:59 +02:00
2026-08-02 16:21:19 +02:00
2026-10-06 19:32:31 +02:00
2026-10-21 21:40:06 +02:00
2026-10-20 16:06:10 +02:00
2026-08-02 16:21:19 +02:00
2026-09-10 12:14:14 +02:00
2026-08-08 07:14:04 +02:00
2026-08-08 15:30:38 +02:00
2026-10-22 04:29:35 +02:00
2026-10-20 09:51:12 +02:00
2026-07-31 11:08:06 +02:00
2026-07-31 09:07:50 +02:00
2026-10-20 06:06:25 +02:00
2026-10-20 20:29:46 +02:00
2026-08-06 13:46:42 +02:00
2026-10-21 19:13:37 +02:00
2026-09-26 19:59:11 +02:00
2026-08-07 08:10:48 +02:00
2026-10-15 21:49:02 +02:00
2026-10-15 21:49:02 +02:00
2026-09-10 12:14:14 +02:00
2026-10-20 16:45:11 +02:00
2026-10-20 09:51:12 +02:00
2026-09-26 15:33:34 +02:00
2026-10-08 16:45:49 +02:00
2026-07-26 14:37:57 +02:00
2026-09-11 14:36:58 +02:00
2026-09-11 11:03:04 +02:00
2026-10-20 10:55:42 +02:00
2026-10-15 23:37:26 +02:00
2026-10-08 11:18:14 +02:00
2026-08-13 12:08:59 +02:00
2026-06-10 11:00:26 +02:00
2026-10-20 09:08:40 +02:00
2026-07-07 18:43:13 +02:00
2026-09-26 22:45:51 +02:00
2026-09-11 09:09:46 +02:00
2026-09-26 16:31:03 +02:00
2026-09-15 14:06:27 +02:00
2026-10-14 18:57:06 +02:00
2026-10-20 09:08:40 +02:00
2026-09-13 14:00:11 +02:00
2026-07-19 10:59:40 +02:00
2026-05-15 07:35:05 +02:00
2026-08-22 10:55:40 +02:00
2026-08-23 14:06:37 +02:00
2026-10-20 20:29:46 +02:00
2026-05-16 19:46:43 +02:00
2026-07-21 00:05:03 +02:00
2026-10-03 23:46:40 +02:00
2026-10-22 00:42:19 +02:00
2026-10-08 22:57:47 +02:00
2026-10-20 10:10:31 +02:00
2026-10-20 10:10:49 +02:00
2026-10-20 16:09:28 +02:00
2026-09-30 22:21:46 +02:00
2026-09-24 10:57:45 +02:00
2026-08-06 23:04:29 +02:00
2026-08-06 19:10:02 +02:00
2026-08-06 20:48:50 +02:00
2026-09-10 00:02:03 +02:00
2026-10-16 01:20:53 +02:00
2026-10-21 19:49:07 +02:00
2026-10-21 19:49:07 +02:00
2026-10-20 13:53:54 +02:00
2026-10-20 05:33:21 +02:00
2026-10-15 23:57:27 +02:00
2026-08-02 16:21:19 +02:00
2026-10-15 20:24:01 +02:00
2026-10-21 19:43:02 +02:00
2026-09-28 00:34:11 +02:00
2026-10-09 00:41:56 +02:00
2026-09-25 09:17:25 +02:00
2026-10-20 13:24:00 +02:00
2026-10-19 16:43:52 +02:00
2026-07-30 11:55:16 +02:00
2026-10-08 17:23:47 +02:00
2026-10-21 19:49:07 +02:00
2026-10-21 19:24:21 +02:00
2026-10-22 00:09:40 +02:00
2026-10-21 22:01:50 +02:00
2026-10-22 04:15:11 +02:00
2026-10-21 21:55:57 +02:00
2026-09-10 01:09:50 +02:00
2026-08-07 06:11:36 +02:00
2026-10-19 11:06:55 +02:00
2026-09-10 11:02:32 +02:00
2026-08-07 05:11:02 +02:00
2026-08-07 05:11:02 +02:00
2026-10-21 19:37:22 +02:00
2026-08-05 23:58:18 +02:00
2026-10-22 00:02:24 +02:00
2026-10-22 04:29:35 +02:00
2026-10-22 04:29:47 +02:00
2026-10-21 21:44:29 +02:00
2026-10-20 13:01:45 +02:00
2026-09-26 19:54:38 +02:00
2026-10-17 09:17:03 +02:00
2026-10-21 21:38:32 +02:00
2026-07-29 13:37:20 +02:00
2026-10-22 04:29:47 +02:00
2026-10-05 21:08:48 +02:00
2026-10-20 09:51:12 +02:00
2026-10-20 09:15:31 +02:00
2026-10-20 09:53:31 +02:00
2026-10-20 13:01:45 +02:00
2026-10-09 16:05:32 +02:00
2026-10-21 22:02:55 +02:00
2026-10-21 21:55:57 +02:00
2026-10-22 05:39:35 +02:00
2026-10-20 07:30:00 +02:00
2026-10-01 09:59:57 +02:00
2026-10-16 01:24:56 +02:00
2026-10-19 11:06:55 +02:00
2026-09-25 07:39:07 +02:00
2026-10-22 04:29:47 +02:00
2026-10-21 12:22:36 +02:00
2026-09-26 10:01:04 +02:00
2026-09-24 09:22:50 +02:00
2026-10-21 22:27:59 +02:00
2026-10-21 19:35:47 +02:00
2026-10-21 22:17:59 +02:00
2026-10-16 03:57:46 +02:00
2026-10-20 09:48:15 +02:00