peter
25aed6635f
perf(feed): a shuffle walks a stored random key instead of sorting the whole scope
...
Every video carries a random number drawn once (videos.shuffle_key, migration 0118, indexed with
id). A seed picks a point on that ring: the feed's Shuffle sort pages along it and wraps, and the
Home surprise reads a 500-video window of it and shuffles that window by the seed, so no video is
favoured for sitting after a wide gap. The md5(id || seed) order read and sorted the whole feed
scope on every call: ~350 ms on prod per surprise, 381-767 ms per Shuffle page on localdev, now
14 ms and 4 ms.
2026-11-07 04:00:00 +01:00
..
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-10-11 03:30:34 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-23 07:43:06 +02:00
2026-08-28 03:53:04 +02:00
2026-08-28 04:20:29 +02:00
2026-08-29 08:02:11 +02:00
2026-08-30 04:45:11 +02:00
2026-09-02 02:21:46 +02:00
2026-09-04 00:14:12 +02:00
2026-09-04 01:23:11 +02:00
2026-09-04 04:05:28 +02:00
2026-09-04 20:29:33 +02:00
2026-09-06 03:31:26 +02:00
2026-09-13 21:53:25 +02:00
2026-09-16 00:34:50 +02:00
2026-09-17 00:20:14 +02:00
2026-09-17 02:42:12 +02:00
2026-09-19 04:51:31 +02:00
2026-09-19 21:38:53 +02:00
2026-09-19 22:26:49 +02:00
2026-09-29 01:52:02 +02:00
2026-09-29 23:44:48 +02:00
2026-09-30 02:19:54 +02:00
2026-09-30 03:26:57 +02:00
2026-10-02 23:43:21 +02:00
2026-10-02 23:43:21 +02:00
2026-10-05 00:19:38 +02:00
2026-10-05 00:19:50 +02:00
2026-10-06 23:55:41 +02:00
2026-10-07 02:23:37 +02:00
2026-10-09 00:06:02 +02:00
2026-10-11 03:30:34 +02:00
2026-10-11 04:42:55 +02:00
2026-10-13 00:14:09 +02:00
2026-10-13 00:14:09 +02:00
2026-10-15 04:58:16 +02:00
2026-10-15 01:02:29 +02:00
2026-10-15 02:23:24 +02:00
2026-10-18 21:21:19 +02:00
2026-10-18 02:23:15 +02:00
2026-10-18 03:45:18 +02:00
2026-10-20 01:56:30 +02:00
2026-10-23 17:04:54 +02:00
2026-10-23 22:07:11 +02:00
2026-10-23 23:45:54 +02:00
2026-10-24 11:29:14 +02:00
2026-11-07 02:20:03 +01:00
2026-11-07 04:00:00 +01:00