Repository navigation
perf(sync2): export only what a linked sync can send and back up only merges that need it - #1626
Merged
Merged
Conversation
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.
Summary
On a phone with a large library, every linked sync exported the whole library to compare it with what was already sent, and a merge first wrote a full-profile backup. With another device playing that ran every 12 to 45 s; logcat showed 40 MB and 96 to 120 MB large-object bursts at each sync and 3 to 6 s backups, with the heap reaching 245 of 256 MB.
InvalidationTrackersaw its tables change or while the ledger holds nothing of it (after a reset), every other collection as before. Skipped collections would have sent nothing.Related issue
Refs #1412
Change type
Validation
./gradlew :app:assembleGithubDebug: passed./gradlew :app:testGithubDebugUnitTest: 4717 tests, 0 failures (2 skipped), including the newPushPlanTestand the newApplyOnceTestcase:app:compileFossDebugKotlinpassed,ktlintCheckpassed,python3 .github/scripts/nightly_notes.py --checkpassedTest device and Android version:
Screenshots or recordings
Risk and compatibility
No Room schema change: one new read query on the linked-devices
senttable.What is uploaded and merged is unchanged; only when exports and backups run changes. A failed push marks its Room collections as changed again so the next push exports them.
Battery and memory: fewer exports and backups per sync. Not yet measured on a device.
The change does not introduce secrets, private data, or unexpected telemetry.
New user-facing text uses Android string resources.
Dependency and lockfile changes are intentional and limited to this PR.
Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
Breaking changes and upgrade steps are clearly documented.