Commit cb46d4c
perf(tui): memoize subagent nodes per session
detail_subagents re-ran store.workflow_nodes (a recursive CTE or a
backend parse) on every paint of the Subagents tab -- every scroll step
and every 200ms toast repaint. Cache the rows per session in
_nodes_by_session, the _tool_by_session/_turns_by_session pattern,
cleared in the same reload/source-switch places; the export dataset
reads through the same memo.1 parent 40ec8d3 commit cb46d4c
3 files changed
Lines changed: 59 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
| |||
1061 | 1064 | | |
1062 | 1065 | | |
1063 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1064 | 1079 | | |
1065 | 1080 | | |
1066 | 1081 | | |
| |||
1213 | 1228 | | |
1214 | 1229 | | |
1215 | 1230 | | |
| 1231 | + | |
1216 | 1232 | | |
1217 | 1233 | | |
1218 | 1234 | | |
| |||
1378 | 1394 | | |
1379 | 1395 | | |
1380 | 1396 | | |
| 1397 | + | |
1381 | 1398 | | |
1382 | 1399 | | |
1383 | 1400 | | |
| |||
1779 | 1796 | | |
1780 | 1797 | | |
1781 | 1798 | | |
1782 | | - | |
| 1799 | + | |
1783 | 1800 | | |
1784 | 1801 | | |
1785 | 1802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1768 | 1768 | | |
1769 | 1769 | | |
1770 | 1770 | | |
1771 | | - | |
| 1771 | + | |
1772 | 1772 | | |
1773 | 1773 | | |
1774 | 1774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7461 | 7461 | | |
7462 | 7462 | | |
7463 | 7463 | | |
| 7464 | + | |
| 7465 | + | |
| 7466 | + | |
| 7467 | + | |
| 7468 | + | |
| 7469 | + | |
| 7470 | + | |
| 7471 | + | |
| 7472 | + | |
| 7473 | + | |
| 7474 | + | |
| 7475 | + | |
| 7476 | + | |
| 7477 | + | |
| 7478 | + | |
| 7479 | + | |
| 7480 | + | |
| 7481 | + | |
| 7482 | + | |
| 7483 | + | |
| 7484 | + | |
| 7485 | + | |
| 7486 | + | |
| 7487 | + | |
| 7488 | + | |
| 7489 | + | |
| 7490 | + | |
| 7491 | + | |
| 7492 | + | |
| 7493 | + | |
| 7494 | + | |
| 7495 | + | |
| 7496 | + | |
| 7497 | + | |
| 7498 | + | |
| 7499 | + | |
| 7500 | + | |
| 7501 | + | |
| 7502 | + | |
| 7503 | + | |
7464 | 7504 | | |
7465 | 7505 | | |
7466 | 7506 | | |
| |||
0 commit comments