perf(workspace-state): compress delta history, cache gitignore lookups, tighten debounce

This commit is contained in:
xintaofei
2026-04-24 16:02:06 +08:00
parent b79f06f7ae
commit 8385837640
2 changed files with 242 additions and 21 deletions

View File

@@ -1084,7 +1084,7 @@ export function FileTreeTab() {
// reflected in the backend's depth-2 tree_snapshot, so changes inside them
// don't emit a tree_replace delta — the frontend has to target invalidation
// by matching each `changed_paths` entry against its cached ancestors.
// The backend already debounces raw FS events (1s / 3s max), so we only
// The backend already debounces raw FS events (300ms / 1.5s max), so we only
// need a microtask hop here to merge paths that hit the same cached
// ancestor within one envelope (or any synchronous burst of envelopes).
const subscribeWorkspaceEnvelopes = workspaceState.subscribeEnvelopes