Skip to content

perf(native-engine): prune unchanged remote subtrees - #345

Merged
gnacho merged 1 commit into
mainfrom
perf/344-prune-remote-discovery
Nov 19, 2026
Merged

gnacho merged 1 commit into
mainfrom
perf/344-prune-remote-discovery

Conversation

@gnacho

@gnacho gnacho commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Reuse journal entries for remote subtrees whose directory ETag still matches the parent's WebDAV listing.
  • Index the journal by path to avoid a full scan for every directory comparison.
  • Refresh directory and ancestor ETags after uploads, mkdir, delete, and move operations. Children are refreshed before the directory itself so a failed listing cannot leave a fresh ETag with stale children.
  • Add request-count tests for pruning, missing ETags, deleted directories, remote mutations, and post-transfer refreshes.

Validation

  • The first regression test failed with 4 discovery requests instead of the expected 2 before the implementation.
  • The remote mutation, refresh-order, and prefix-sibling tests also failed before their fixes and now pass. The prefix case proves that a sibling such as stable-old cannot hide cached children and trigger local deletions.
  • Live isolated E2E against Nextcloud and OpenCloud covered empty directories, a nested remote edit, and a local deletion followed by another remote edit. Discovery only visited /, changed, and changed/nested; stable and empty subtrees were not walked.
  • Both providers downloaded the remote edits correctly and returned to one root check on the following no-change pass.
  • ETag probes on both providers confirmed that descendant edits change every ancestor ETag while an unchanged sibling keeps its ETag.
  • All temporary remote folders were deleted and their absence verified.
  • Full gates: clippy, 722 app tests passed and 2 ignored, 50 native tests passed and 1 ignored, 3 CLI tests passed, 27 pathological tests passed, i18n parity, formatting, and release build.
  • Local deployment: all 7 folders completed in the current app invocation with one root check each and zero errors or transfers. GitHub check and coverage are green.

Closes #344

Reuse directory ETags from the parent's WebDAV listing to skip unchanged subtrees during discovery. Refresh directory and ancestor ETags after remote mutations and add request-count regressions, including prefix siblings.

Closes #344
@gnacho
gnacho merged commit eb03a57 into main Nov 19, 2026
3 of 4 checks passed
@gnacho
gnacho deleted the perf/344-prune-remote-discovery branch November 19, 2026 12:30
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.

Reuse journal ETags to prune unchanged remote subtrees

1 participant