zarzet
017009726c
perf(covers): add a cover index that saves in batches
...
flutter_cache_manager's JsonCacheInfoRepository re-encodes and rewrites
the whole index on the UI isolate for every touch, insert and delete,
and scans every entry per lookup. A scroll that shows covers touches one
entry per cover, so it keeps a chain of full rewrites going.
CoverCacheInfoRepository keeps the same file and JSON format (rows in id
order, the same bytes for the same rows, the same .tmp and rename), so
older and newer builds read each other's index. It reads the file in a
worker isolate, looks entries up by key, keeps each row's encoded JSON
until the row changes, and saves 1 s after an insert, delete or content
update and 30 s after a touch, or at once on flush and close.
Host numbers (JIT, test mode): a scroll over 200 cached covers in a
600-entry index rewrote the index 160 times (about 96,000 rows encoded);
now it writes nothing until the flush, which writes once and encodes the
200 touched rows. 20 inserts: 20 writes, now 1. A full rewrite of 1,000
rows held the UI isolate 2.5 to 3.5 ms; a save now takes 0.1 to 0.4 ms
there. Opening a 1,000-entry index held it 3 to 6 ms, now under 1 ms.
1,000 lookups took 6.4 ms at 20 entries, 15.6 ms at 1,000 and 450 ms at
20,000; now about 3 ms at every size.
2026-10-31 22:14:06 +07:00
..
2026-10-23 23:08:48 +07:00
2026-10-31 01:04:45 +07:00
2026-10-21 01:47:56 +07:00
2026-10-25 04:32:46 +07:00
2026-10-31 01:20:41 +07:00
2026-10-20 12:00:44 +07:00
2026-10-25 15:45:49 +07:00
2026-10-23 22:35:26 +07:00
2026-10-20 12:00:44 +07:00
2026-07-02 01:24:20 +07:00
2026-10-25 16:36:32 +07:00
2026-10-23 23:08:48 +07:00
2026-10-28 20:43:10 +07:00
2026-10-20 12:00:44 +07:00
2026-10-22 01:41:09 +07:00
2026-09-17 02:59:22 +07:00
2026-10-19 00:59:24 +07:00
2026-10-23 23:08:48 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 23:08:48 +07:00
2026-10-23 15:39:44 +07:00
2026-10-23 15:39:44 +07:00
2026-10-23 15:39:44 +07:00
2026-10-23 15:39:44 +07:00
2026-10-04 03:55:24 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-30 18:55:58 +07:00
2026-10-23 23:08:48 +07:00
2026-10-29 01:48:14 +07:00
2026-10-20 12:00:44 +07:00
2026-10-19 00:59:24 +07:00
2026-10-07 03:03:44 +07:00
2026-10-29 02:23:07 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-06 22:00:15 +07:00
2026-10-20 12:00:44 +07:00
2026-10-31 22:14:06 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 23:08:48 +07:00
2026-10-30 18:55:58 +07:00
2026-10-23 23:08:48 +07:00
2026-10-25 12:55:40 +07:00
2026-10-28 20:43:10 +07:00
2026-10-31 22:11:10 +07:00
2026-10-20 16:14:40 +07:00
2026-10-23 23:08:48 +07:00
2026-10-22 02:43:04 +07:00
2026-10-20 15:07:31 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 16:14:40 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-05 02:31:01 +07:00
2026-10-21 01:48:14 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 16:14:40 +07:00
2026-10-23 22:44:37 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-06 13:09:26 +07:00
2026-10-08 17:25:11 +07:00
2026-10-20 12:00:44 +07:00
2026-10-30 14:17:27 +07:00
2026-10-31 01:11:54 +07:00
2026-10-22 01:41:09 +07:00
2026-10-20 16:52:44 +07:00
2026-10-27 02:20:20 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 23:08:48 +07:00
2026-10-30 00:13:27 +07:00
2026-10-30 00:13:27 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 22:44:37 +07:00
2026-10-23 22:44:37 +07:00
2026-10-23 22:44:37 +07:00
2026-10-30 00:13:27 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 03:17:10 +07:00
2026-10-23 23:08:48 +07:00
2026-10-31 01:30:13 +07:00
2026-10-23 22:43:22 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 19:16:30 +07:00
2026-10-20 12:00:44 +07:00
2026-10-31 22:07:30 +07:00
2026-10-25 12:55:40 +07:00
2026-10-23 22:43:23 +07:00
2026-10-30 14:15:10 +07:00
2026-10-31 01:20:41 +07:00
2026-10-25 15:45:49 +07:00
2026-10-24 03:27:23 +07:00
2026-10-23 03:59:29 +07:00
2026-10-23 22:28:48 +07:00
2026-10-30 18:55:58 +07:00
2026-10-27 02:10:21 +07:00
2026-10-21 14:22:46 +07:00
2026-10-20 12:00:44 +07:00
2026-10-31 01:20:41 +07:00
2026-10-24 03:27:23 +07:00
2026-10-30 19:39:35 +07:00
2026-10-31 01:20:41 +07:00
2026-10-31 01:20:41 +07:00
2026-10-30 16:09:33 +07:00
2026-10-31 01:11:55 +07:00
2026-10-23 18:51:50 +07:00
2026-10-23 23:08:48 +07:00
2026-10-28 20:43:10 +07:00
2026-10-26 04:07:26 +07:00
2026-10-26 01:33:56 +07:00
2026-10-28 20:43:10 +07:00
2026-10-25 12:55:40 +07:00
2026-10-20 16:55:01 +07:00
2026-10-31 01:11:54 +07:00
2026-10-30 18:53:55 +07:00
2026-10-31 01:14:39 +07:00
2026-10-20 16:55:01 +07:00
2026-10-31 01:14:39 +07:00
2026-10-20 16:55:01 +07:00
2026-10-20 16:55:01 +07:00
2026-10-29 01:48:14 +07:00
2026-10-23 22:44:37 +07:00
2026-10-23 22:44:37 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 22:43:23 +07:00
2026-10-23 22:44:37 +07:00
2026-10-20 12:00:44 +07:00
2026-10-31 01:11:54 +07:00
2026-10-31 01:11:55 +07:00
2026-10-31 01:11:55 +07:00
2026-10-30 15:19:26 +07:00
2026-10-31 01:11:55 +07:00
2026-10-31 01:14:39 +07:00
2026-10-31 01:11:55 +07:00
2026-10-26 01:33:56 +07:00
2026-10-26 01:33:56 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-17 11:45:53 +07:00
2026-10-20 13:38:13 +07:00
2026-10-20 12:00:44 +07:00
2026-10-03 04:27:47 +07:00
2026-10-20 12:00:44 +07:00
2026-10-31 22:07:30 +07:00
2026-10-25 16:58:21 +07:00
2026-10-29 00:55:58 +07:00
2026-10-31 22:07:30 +07:00
2026-10-31 01:00:05 +07:00
2026-10-30 01:29:33 +07:00
2026-10-30 01:29:33 +07:00
2026-10-31 01:00:05 +07:00
2026-10-31 22:07:30 +07:00
2026-10-23 03:15:19 +07:00
2026-10-25 23:36:03 +07:00
2026-10-30 19:41:42 +07:00
2026-10-30 18:55:58 +07:00
2026-10-07 23:20:27 +07:00
2026-10-31 01:11:54 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 00:39:08 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 16:55:01 +07:00
2026-10-28 20:43:10 +07:00
2026-10-30 15:07:30 +07:00
2026-10-28 20:43:10 +07:00
2026-10-20 12:00:44 +07:00
2026-10-23 22:44:37 +07:00
2026-10-25 12:55:40 +07:00
2026-10-26 01:13:52 +07:00
2026-10-25 05:56:55 +07:00
2026-10-23 22:44:37 +07:00
2026-10-19 00:56:52 +07:00
2026-10-20 13:44:30 +07:00
2026-10-19 00:56:52 +07:00
2026-10-20 12:00:44 +07:00
2026-10-21 18:19:43 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-25 23:36:14 +07:00
2026-10-20 12:00:44 +07:00
2026-10-30 13:12:05 +07:00
2026-10-31 01:20:41 +07:00
2026-10-20 12:00:44 +07:00
2026-10-20 16:55:01 +07:00
2026-10-25 13:02:11 +07:00
2026-10-23 23:08:48 +07:00
2026-10-23 22:35:26 +07:00
2026-10-20 17:44:49 +07:00
2026-09-06 16:03:46 +07:00
2026-10-25 15:15:52 +07:00