Repository navigation
perf(sync): 增量同步与报表缓存——稳态同步 8.2s→0.15s - #61
Merged
Merged
Conversation
- refresh 按 size+mtimeNs 签名跳过未变化文件,跳过路径保留单通道标题富化 - 确定性失败/按设计排除落 import_failure memo(签名+适配器),启动清空重探测 - sessions() 重建结果缓存,导入/失败标记/退役/墓碑清理统一失效 - refresh 快照查找 O(n²)→Map,跳过富化内存比较消除逐行 prepare N+1 - 真实库副本实测:稳态同步 8,207ms→144-177ms(约 50×),/api/report 400ms→0ms, 数据逐行一致(events/tokens/sources 三计数比对);真实样本追加闭环冒烟通过
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #63
Summary
serve 模式下任一会话文件变化都会触发「968 文件全量重解析 + 全事件重建」的同步链路(实测 8.2s),且每次 /api/report 都重建全部会话(实测 ~400ms)。本 PR 让同步与报表都利用「没变就不必重算」:文件级签名跳过 + 确定性结论 memo + 报表缓存。真实库副本实测稳态同步 8,207ms → 144-177ms(约 50×),报表热路径 ~0ms,数据逐行一致。
Release Notes
SemVer Recommendation
minor
验证
设计说明