google-labs-jules[bot] and PR0M3TH3AN
c82ab2d490
Optimize EventsCacheStore persistence with dirty state tracking
...
Implemented `dirtyEventIds` and `dirtyTombstones` in `NostrClient` to track only modified items.
Updated `EventsCacheStore.persistSnapshot` to accept these dirty sets and iterate only over changed items, skipping the O(N) serialization loop for unchanged data.
Added heuristic to skip deletion scan if the dataset size has not decreased.
Optimized `NostrClient` methods (`flushEventBuffer`, `deleteAllVersions`, `fetchVideos`, etc.) to flag modified events.
Updated `nostr-delete-flow.test.mjs` to use valid hex IDs for NIP-compliant testing.
Benchmark results (5000 items, single update):
- Before: ~19ms (O(N))
- After: ~2ms (O(1))
Co-authored-by: PR0M3TH3AN <[email protected] >
2026-02-01 16:50:28 +00:00
..
2026-01-27 14:45:40 +00:00
2026-01-29 16:32:04 +00:00
2026-01-22 19:36:31 -05:00
2026-01-28 15:40:12 +00:00
2026-01-23 04:39:18 +00:00
2026-02-01 13:32:00 +00:00
2026-01-30 16:36:27 +00:00
2026-01-26 11:35:18 +00:00
2026-02-01 02:10:21 +00:00
2025-10-15 14:54:24 -04:00
2026-01-31 03:32:52 +00:00
2026-02-01 08:01:22 -05:00
2026-01-30 10:05:35 -05:00
2026-01-29 08:54:44 -05:00
2026-01-05 16:58:59 +00:00
2026-01-30 16:51:01 -05:00
2026-01-30 16:26:31 +00:00
2026-01-24 11:44:16 +00:00
2026-01-30 20:31:24 +00:00
2026-01-13 20:32:06 +00:00
2026-01-18 02:39:42 +00:00
2025-10-14 13:31:22 -04:00
2026-01-06 16:22:49 -05:00
2026-01-19 16:24:07 +00:00
2025-10-26 19:23:40 -04:00
2026-01-20 12:39:19 +00:00
2025-10-27 18:19:14 -04:00
2026-01-24 21:42:37 +00:00
2026-01-23 05:33:57 +00:00
2025-10-26 12:05:03 -04:00
2026-02-01 09:14:43 -05:00
2026-01-23 02:36:40 +00:00
2026-01-22 20:29:07 +00:00
2025-10-14 08:48:17 -04:00
2026-01-13 20:32:06 +00:00
2026-01-19 03:02:23 +00:00
2025-10-26 16:06:40 -04:00
2025-10-20 13:17:00 -04:00
2026-01-06 15:32:21 -05:00
2026-01-06 15:32:21 -05:00
2025-10-08 16:39:30 -04:00
2025-11-03 14:35:43 -05:00
2026-01-06 15:32:21 -05:00
2026-02-01 16:50:28 +00:00
2025-10-22 07:18:25 -04:00
2026-02-01 13:32:00 +00:00
2026-01-27 11:54:02 +00:00
2026-02-01 13:32:00 +00:00
2026-01-06 15:32:21 -05:00
2025-10-22 15:48:59 -04:00
2026-02-01 13:32:00 +00:00
2026-01-31 10:33:50 +00:00
2026-01-29 11:53:42 +00:00
2026-01-26 21:19:47 +00:00
2025-10-22 22:17:30 -04:00
2026-01-06 15:36:37 -05:00
2025-10-29 06:52:30 -04:00
2025-10-21 17:46:41 -04:00
2026-01-14 03:52:53 +00:00
2026-01-31 11:24:53 +00:00
2026-01-30 15:03:18 +00:00
2025-10-29 22:14:20 -04:00
2026-01-27 03:20:08 +00:00
2025-10-02 12:48:24 -04:00
2026-01-22 22:50:00 -05:00
2026-01-25 03:34:10 +00:00
2026-01-29 11:53:42 +00:00
2026-01-25 17:40:16 +00:00
2025-10-20 21:15:47 -04:00
2026-01-30 16:48:03 -05:00
2026-01-27 02:09:22 +00:00
2026-01-30 16:48:03 -05:00
2025-10-10 12:56:46 -04:00
2025-10-16 16:43:58 -04:00
2026-01-27 03:46:40 +00:00
2026-01-27 02:04:04 +00:00
2026-01-30 03:40:36 +00:00
2026-01-27 03:54:41 +00:00
2026-01-27 02:09:22 +00:00
2025-10-23 13:43:05 -04:00
2026-01-06 15:32:21 -05:00
2025-10-29 17:06:19 -04:00
2026-01-06 15:32:21 -05:00
2026-01-29 03:19:06 +00:00
2026-01-07 00:43:18 +00:00
2025-10-04 17:25:43 -04:00
2026-01-28 02:26:05 +00:00
2026-01-31 19:07:31 +00:00
2025-10-05 22:03:07 -04:00
2026-01-06 15:32:21 -05:00