Brooklyn Nicholson
40160e2a04
perf(desktop): batch sidebar session slices into one profile-DB pass
...
The sidebar refresh fired three /api/profiles/sessions calls (recents, cron,
messaging), and each one reopened every selected profile's state.db and re-ran
list_sessions_rich + session_count — ~3N DB opens/counts per refresh, on every
turn/broadcast/reconnect.
Add GET /api/profiles/sessions/sidebar: one pass that opens each profile DB
once and runs the three source-scoped queries together (recents scoped to the
active profile; cron + messaging cross-profile), returning the three windows in
one payload. Same read-only projection, 300s active heuristic, and caller-
supplied source taxonomy (recents_exclude / messaging_exclude / source=cron) as
the per-slice endpoint.
Renderer refreshSessions now makes one listSidebarSessions call and distributes
recents/cron/messaging to their stores (cron *jobs* stay a separate getCronJobs
API). Electron splices remote profiles per slice via fetchProfilesSessionSlice
(reusing the proven per-slice merge) so remote correctness is preserved; the
no-remote common case gets the single-open fast path.
From the Desktop performance audit (P1: "Batch sidebar session slices").
2026-07-18 21:45:18 -04:00
..
2026-07-17 15:47:08 -07:00
2026-07-17 20:55:24 +00:00
2026-07-11 03:51:43 -07:00
2026-07-17 11:37:25 +05:30
2026-07-02 13:17:41 -07:00
2026-07-10 17:50:43 +05:30
2026-07-16 06:14:56 -07:00
2026-07-16 22:56:45 -04:00
2026-07-02 13:17:41 -07:00
2026-07-17 19:16:48 -04:00
2026-07-16 22:24:45 -07:00
2026-07-11 12:28:55 +05:30
2026-07-18 14:01:33 -07:00
2026-07-06 11:17:41 -07:00
2026-07-15 09:59:38 -07:00
2026-07-18 14:30:24 +05:30
2026-07-18 02:49:28 -07:00
2026-07-18 14:01:56 -07:00
2026-07-16 15:45:07 +00:00
2026-07-10 00:47:51 +05:30
2026-07-01 23:51:54 +05:30
2026-07-12 00:26:49 -07:00
2026-07-09 18:23:18 -07:00
2026-07-18 19:01:10 -04:00
2026-07-12 03:05:12 -07:00
2026-07-17 04:33:34 -07:00
2026-07-16 14:30:05 +10:00
2026-07-05 00:44:15 -07:00
2026-07-09 14:30:16 +05:30
2026-07-17 04:58:35 -07:00
2026-07-06 02:21:32 -07:00
2026-07-06 12:26:21 -07:00
2026-07-11 12:28:55 +05:30
2026-07-05 00:55:51 -07:00
2026-07-02 04:51:56 +05:30
2026-07-16 19:52:53 -04:00
2026-07-14 07:02:05 -07:00
2026-07-14 07:02:05 -07:00
2026-07-09 12:21:16 +05:30
2026-07-06 03:18:02 -07:00
2026-07-03 20:18:00 +05:30
2026-07-16 19:49:39 -04:00
2026-07-09 12:21:16 +05:30
2026-07-09 14:48:50 +05:30
2026-07-09 16:13:59 -05:00
2026-07-09 20:03:11 -07:00
2026-07-02 19:52:18 -05:00
2026-07-17 15:01:54 -04:00
2026-07-18 19:01:10 -04:00
2026-07-16 07:19:36 -07:00
2026-07-11 05:43:35 -07:00
2026-07-16 05:08:56 -07:00
2026-07-18 20:01:55 +05:30
2026-07-15 07:39:17 -07:00
2026-07-10 00:47:51 +05:30
2026-07-16 20:45:05 -04:00
2026-07-09 20:03:11 -07:00
2026-07-15 07:39:42 -07:00
2026-07-05 05:35:44 -07:00
2026-07-11 05:43:07 -07:00
2026-07-18 02:31:20 -07:00
2026-07-01 16:25:48 -05:00
2026-07-15 07:39:17 -07:00
2026-07-16 07:33:14 -07:00
2026-07-12 23:09:41 -07:00
2026-07-15 07:39:17 -07:00
2026-07-09 16:13:59 -05:00
2026-07-15 07:39:17 -07:00
2026-07-11 03:51:43 -07:00
2026-07-12 03:08:08 -07:00
2026-07-05 19:10:00 -07:00
2026-07-15 04:56:25 -07:00
2026-07-17 04:50:47 -07:00
2026-07-17 04:50:47 -07:00
2026-07-07 04:09:35 -07:00
2026-07-05 23:00:34 +05:30
2026-07-17 13:49:12 -07:00
2026-07-15 00:10:31 -07:00
2026-07-03 03:33:06 -07:00
2026-07-06 02:46:24 -07:00
2026-07-10 13:10:30 +05:30
2026-07-12 03:04:07 -07:00
2026-07-18 14:01:56 -07:00
2026-07-17 15:47:08 -07:00
2026-07-14 03:11:19 -07:00
2026-07-16 13:33:02 -07:00
2026-07-15 00:10:31 -07:00
2026-07-18 07:05:58 -07:00
2026-07-01 05:06:00 -07:00
2026-07-02 06:52:46 +00:00
2026-07-07 00:53:56 -07:00
2026-07-06 11:10:51 -07:00
2026-07-07 21:13:19 -07:00
2026-07-01 04:05:15 -07:00
2026-07-06 04:38:17 -07:00
2026-07-06 11:20:47 -07:00
2026-07-07 15:14:30 -07:00
2026-07-15 07:39:17 -07:00
2026-07-05 00:48:50 -07:00
2026-07-05 19:13:20 -07:00
2026-07-05 11:44:53 +05:30
2026-07-07 00:53:48 -07:00
2026-07-18 14:30:24 +05:30
2026-07-11 05:43:07 -07:00
2026-07-07 02:32:32 -07:00
2026-07-09 19:54:02 -07:00
2026-07-09 16:46:07 -07:00
2026-07-07 12:36:41 -07:00
2026-07-09 19:54:02 -07:00
2026-07-05 22:04:52 -07:00
2026-07-03 13:44:00 -07:00
2026-07-17 04:53:38 -07:00
2026-07-05 23:01:10 -07:00
2026-07-07 15:12:49 -07:00
2026-07-16 05:44:43 -07:00
2026-07-05 14:51:49 -07:00
2026-07-09 20:03:11 -07:00
2026-07-05 13:42:46 -07:00
2026-07-09 19:57:54 -07:00
2026-07-14 13:58:36 -07:00
2026-07-02 04:59:02 -07:00
2026-07-16 05:44:43 -07:00
2026-07-16 05:08:56 -07:00
2026-07-18 14:30:24 +05:30
2026-07-16 01:19:29 -07:00
2026-07-18 20:01:55 +05:30
2026-07-08 07:09:08 -07:00
2026-07-07 16:27:28 -07:00
2026-07-16 01:17:11 -07:00
2026-07-18 17:17:25 -04:00
2026-07-17 23:04:33 +00:00
2026-07-07 05:12:24 -07:00
2026-07-05 19:35:30 -07:00
2026-07-03 04:08:37 -07:00
2026-07-15 00:09:24 +05:30
2026-07-11 12:28:55 +05:30
2026-07-03 04:23:15 +05:30
2026-07-01 05:25:33 -07:00
2026-07-09 12:21:16 +05:30
2026-07-17 04:33:34 -07:00
2026-07-10 11:43:09 +05:30
2026-07-04 17:58:05 +05:30
2026-07-08 00:20:13 +00:00
2026-07-16 07:17:55 -07:00
2026-07-07 13:54:07 -07:00
2026-07-16 00:02:09 +05:30
2026-07-03 15:22:43 -05:00
2026-07-18 21:45:18 -04:00
2026-07-16 15:45:07 +00:00
2026-07-16 12:36:51 +05:30
2026-07-07 17:45:51 -07:00
2026-07-02 13:17:41 -07:00
2026-07-02 13:17:41 -07:00
2026-07-09 16:58:37 -07:00