Repository navigation
[PR] perf: index covered timestamps in compression receipts - #6716
ranxianglei merged 2 commits into
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 Searched open + closed issues/PRs by failure signature (helper name + timestamp/coverage perf), not just title: #5236 introduced the original 标签: bug, scope/kernel, p2 — 性能缺陷落在默认开启的正常压缩路径上(长 fold 的 O(N²) 成员扫描);范围是宿主侧压缩回执引擎(未动 kernel/);p2 因为只是性能退化,不涉及可用性或缓存泄露。 Review — direction (①): Verified against the PR base, which is exactly current master ( What I verified myself on the PR head (not just the PR's claims):
Regression pass (②): the receipt fingerprint line is a pure function of (blockId, summary, range); the range values are unchanged (same min/max, same null conditions, same first-read order — pinned by the Proxy read-order test), so receipt bytes, the log path ( Quality (④/⑤/⑤b): the six new tests are real semantic controls (exact One finding — pre-existing stale comment at the call site (fix prepared, push blocked): but the #4313 default-on follow-up (2026-10-31) flipped I have this ready as a standalone Verdict: mergeable. Minimal, behavior-preserving, independently verified (identical receipt bytes + measured ~10% gain), full CI green, tests are real. 结构化八问:
判定:可合(mergeable)——上述过时注释为既有问题、已给出修法,由作者处理,不阻塞合并。 |
(ai: vllm-qwen/qwen3.8-27b) 已逐项核实 dd6d34a,并发现一个时间线事实需要说明: 1. 跟进 commit 验证(diff 185042e..dd6d34a):恰好 1 个文件、5 增 4 删,全部是 src/stream.ts:1646-1650 的注释替换,措辞与 review 中给出的建议一致(default ON;opt-out 经 2. 时间线事实(重要):性能主修复已经先于你的跟进 commit 合入 master——batch7-wave7 于 2026-11-14 20:53 (+0800) 以 merge commit
3. 当前 head 的 CI 与合并状态(实测,非转述):
4. 处置:按「一个线程一个修复 PR」规则,不开新 PR——现有 PR 的 head 已携带全部剩余修改,无需任何新分支。 结构化八问:
判定:可合——当前 head(dd6d34af)相对最新 master 的 diff 即注释修正本身,CI 全绿、模拟合并零冲突。等待 owner 合并(合并权在 human)。 |
…6716) into batch7-wave7
Closes #6715.
Problem
Each successful compression receipt resolves the covered time window from persisted first-sight timestamps.
blockCoverageTimes()deduplicates each effective message ID with a scan of all IDs already collected, before including the boundary refs. A long fold therefore performs quadratic membership work just to format its timestamp span. Message timestamps are enabled by default, so this runs in the normal compression path.Change
Index covered IDs and their first-read timestamps in an insertion-ordered Map. Effective IDs and resolved start/end refs retain the same order, each stamp is read once, and a missing stamp still suppresses the entire range. The change is four replacements in the receipt helper; it adds no setting, dependency, wire field, or kernel change.
Verification
scripts/bench-coverage-timestamps.tsexercises the actual publicapplyRanges()path with valid typed text messages, a real kernel, deterministic stored timestamps, UTC display, and persistence disabled. Fixture construction, hashing, and assertions are outside the timed region. Each process first warms up with two 100-message calls.53cde3b8608d64a7792bc01c9033e58ea9b95c44dee16667d63cc5ca385c1921.npm run typecheck, standalone strict TypeScript checking of the benchmark,npm run build, andgit diff --checkpass. Full-suite status comes from hosted CI on the pushed head.Reproduce one measured sample at each revision with:
The formal comparison uses current base
3858b6956abab52da781c2436c0245586ce18358, which already contains the separate image-note lookup optimization from #6612. Earlier exploratory timings on an older base are not used here.History check
Checked the complete Afloat16 production-patch index and all-state searches for the helper and timestamp/coverage performance. #5236 introduces the existing receipt helper and its repeated scan. #6612 indexes a different image-note lookup inside
applyRanges(); #6597 changes JSON-response evidence serialization. Neither modifies timestamp coverage collection. The actual updated master still has the original helper. Related timestamp/release summaries and storage-reactivation work do not duplicate this change.