Repository navigation
Commit dbb6585
perf(server): build the thread list snapshot without decoding it twice
getShellSnapshot and getArchivedShellSnapshot built the snapshot from
rows that SqlSchema had already decoded, then ran a second full
OrchestrationShellSnapshot decode over the result. With thousands of
threads that is about 45 ms and one full object copy per build, and
about 9 callers build it, several times a minute.
Return the built snapshot directly and check it with `satisfies`. The
HTTP and RPC layers still encode it against OrchestrationShellSnapshot
(which trims and validates), the same way the per-item shells from
getThreadShellById already work.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>1 parent 6530de0 commit dbb6585
1 file changed
Lines changed: 8 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
2746 | 2745 | | |
2747 | 2746 | | |
2748 | 2747 | | |
2749 | | - | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2750 | 2752 | | |
2751 | 2753 | | |
2752 | 2754 | | |
| |||
2800 | 2802 | | |
2801 | 2803 | | |
2802 | 2804 | | |
2803 | | - | |
2804 | | - | |
2805 | | - | |
2806 | | - | |
2807 | | - | |
2808 | | - | |
2809 | | - | |
2810 | | - | |
2811 | | - | |
| 2805 | + | |
2812 | 2806 | | |
2813 | 2807 | | |
2814 | 2808 | | |
| |||
2941 | 2935 | | |
2942 | 2936 | | |
2943 | 2937 | | |
2944 | | - | |
| 2938 | + | |
2945 | 2939 | | |
2946 | 2940 | | |
2947 | 2941 | | |
| |||
2991 | 2985 | | |
2992 | 2986 | | |
2993 | 2987 | | |
2994 | | - | |
2995 | | - | |
2996 | | - | |
2997 | | - | |
2998 | | - | |
2999 | | - | |
3000 | | - | |
3001 | | - | |
3002 | | - | |
| 2988 | + | |
3003 | 2989 | | |
3004 | 2990 | | |
3005 | 2991 | | |
| |||
0 commit comments