Opening a long thread still takes 9–12 s on main, and each older page 3–4 s (follow-up to #24895)
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- node.js, sqlite, typescript
- 领域
- backend, databases, performance
调研方向
Start by reading getThreadSnapshotWindow and getThreadHistoryPage in apps/server/src/orchestration-v2/ProjectionStore.ts and the query plan behind each; the #29468 comment links the covering-index approach the local build uses. Check the open pull request #36141 before touching anything, since it may already cover this work. Reproducing needs the 49 GB statev2.sqlite clone read through the real reader worker, so confirm you can get a comparable dataset first. Done looks like thread-open and older-page timings on main approaching the local-build numbers, with a query plan showing payloads are no longer decoded for run and attempt metadata.
由索引模型根据 Issue 内容生成。
描述
#24895 and #20427 were closed on November 11. On main at a044f0c0b3, opening our two coordinator threads and paging back still takes:
| Read | Thread A / B on main | Our local build |
|---|---|---|
Thread open: getThreadSnapshotWindow |
11.0–11.6 / 9.1–9.8 s | 3.7–4.9 s |
Each older page: getThreadHistoryPage |
3.0–4.2 / 2.9–3.6 s | 1.0–2.1 s |
Setup: a block clone of our 49 GB statev2.sqlite, read through the real ProjectionStore (reader worker, node:sqlite), read-only, two passes. Thread A has 7,352 runs and 62,950 turn items, thread B 6,886 runs and 59,668. Our local build was measured on the same clone earlier.
Where the time goes on thread A, second pass:
-
Thread open, 10.8 s:
- the recursive retained-node read, 3.2 s;
- checkpoints, 2.3 s;
- provider turns, attempts and runs, 1.0–1.1 s each;
- subagents and context transfers, 0.9 s each.
The live-or-recent reads (
status IN (...) OR ...) still take about a second each on a thread with 7,000 runs. -
Each older page, 3.2 s: all runs, 1.1 s, and all attempts, 1.1 s, are read to render one page. A count of the earlier items takes another 0.4 s.
Our build takes a page's run and attempt metadata from covering indexes instead of decoding every payload. The #29468 comment links the code. Every thread switch to a long thread pays the open cost, and every scroll back pays the page cost.
Measured and written by Claude (Opus 5.5) in T3 Code; posted with the owner's approval.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 59 分钟
- 30 天内合并 PR
- 418
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
via-triage
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 68/100
维护者通常 1 天内回复
-
Question card options show LaTeX as raw source, though the question text renders it可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[Bug]: Settings inheritance popover shows raw slugs for branch naming, default permissions and response streaming可能已有人在做 @juliusmarminge 于 1 天前认领。 未关闭vouch:denounced
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
相似的 Issue
-
bug platform:mobile root-cause:found
难度 2/5 1-3 小时 新手友好度 72/100
openchamber/openchamber#6926 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
push-based/user-flow#356 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Cygnux-Labs/Tracekit#827 ·
维护者通常 1 天内回复
-
www build: a refused import shows only "ENOENT scandir <outDir>", never the build-audience error未关闭kind:defect
难度 1/5 1 小时以内 新手友好度 91/100
维护者通常 1 天内回复
-
type:bug
难度 2/5 1-3 小时 新手友好度 72/100
nightgauge/nightgauge#3266 ·
维护者通常 1 天内回复