Skip to content

Optimize sync diffing#146

Merged
5cript merged 2 commits intomainfrom
feat/optimize-sync-diffing
Apr 24, 2026
Merged

Optimize sync diffing#146
5cript merged 2 commits intomainfrom
feat/optimize-sync-diffing

Conversation

@5cript
Copy link
Copy Markdown
Owner

@5cript 5cript commented Apr 23, 2026

Moved sync diffing from frontend to backend.

  • Backend-resident SyncSession owns scan trees and runs the diff on its own boost::asio strand.
  • Parallel merge-walk over sorted ScanNode trees replaces the flat-vector diff; one-sided subtrees prune to O(1).
  • Frontend lazily fetches diff-tree children per expansion via new RPCs; no full scan payloads cross the wire.
  • Sparse selection model: set entries imply whole subtrees, filling out on partial toggles and collapsing up when completed.
  • Enqueue minimizer handles bulk vs structural directories off the sparse set.
  • Comparing-phase overlay driven by a backend-decided heavy-compare threshold.
  • Cancellation token unwinds in-flight diffs cleanly on session close and app shutdown.

5cript added 2 commits April 24, 2026 01:43
- Backend-resident SyncSession owns scan trees and runs the diff on its own boost::asio strand.
- Parallel merge-walk over sorted ScanNode trees replaces the flat-vector diff; one-sided subtrees prune to O(1).
- Frontend lazily fetches diff-tree children per expansion via new RPCs; no full scan payloads cross the wire.
- Sparse selection model: set entries imply whole subtrees, filling out on partial toggles and collapsing up when completed.
- Enqueue minimizer handles bulk vs structural directories off the sparse set.
- Comparing-phase overlay driven by a backend-decided heavy-compare threshold.
- Cancellation token unwinds in-flight diffs cleanly on session close and app shutdown.
@5cript 5cript merged commit 1366ac0 into main Apr 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant