Auto-sync: 2026-04-21 00:02
This commit is contained in:
27
wiki/concepts/Incremental-Updates.md
Normal file
27
wiki/concepts/Incremental-Updates.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "Incremental Updates"
|
||||
type: concept
|
||||
tags: [real-time, graph, sync]
|
||||
last_updated: 2026-04-20
|
||||
---
|
||||
|
||||
## Definition
|
||||
Incremental Updates(增量更新)是通过文件监视器和版本控制系统钩子实现图谱实时同步的机制,避免全量重建。
|
||||
|
||||
## Update Triggers
|
||||
- **文件监视器**:监听文件系统变化(create、modify、delete、rename)
|
||||
- **Git Hooks**:在 commit、push 时触发增量更新
|
||||
- **LSP 通知**:textDocument/didChange 事件
|
||||
|
||||
## Consistency Requirements
|
||||
- 原子更新:从不将图谱置于不一致状态
|
||||
- 边引用验证:所有边必须指向有效节点 ID
|
||||
- 文件节点优先:符号节点创建前必须存在父文件节点
|
||||
|
||||
## Performance Target
|
||||
- 图谱更新传播到客户端:<500ms
|
||||
- 内存占用:<500MB(典型项目)
|
||||
|
||||
## Connections
|
||||
- [[graphd]] ← 实现 ← [[Incremental Updates]]
|
||||
- [[File Watcher]] ← 触发 ← [[Incremental Updates]]
|
||||
Reference in New Issue
Block a user