perf(mobile): TAM-7126: skip sync save transaction when there’s nothing to pull - #11092
Merged
Merged
Conversation
jaskfla
requested review from
chris-bes,
dannash100,
edmofro,
passcod and
rohan-bes
as code owners
September 14, 2026 03:38
This was referenced Sep 14, 2026
jaskfla
marked this pull request as draft
September 14, 2026 03:39
jaskfla
added this pull request to stack #11096
September 14, 2026 03:39
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0348c9a. Configure here.
|
🦸 Review Hero Summary (round 1) No issues found. Looks good! |
jaskfla
force-pushed
the
tam-7126-1-skip-noop-save
branch
2 times, most recently
from
September 14, 2026 03:47
c0ecc05 to
7f75791
Compare
|
🦸 Review Hero Summary (round 2) No issues found. Looks good! |
jaskfla
marked this pull request as ready for review
September 14, 2026 05:12
…nothing to pull A zero-record incremental pull still created the snapshot table, opened the (write-locking) save transaction and ran the dependency sort and foreign key check inside it, every five minutes. Now it only advances the pull cursor. The pull count is a Postgres bigint that arrives serialised as a string, so it is coerced to a number where it enters the app; otherwise this gate (and the existing one in pullRecordsInBatches) never matches.
jaskfla
force-pushed
the
tam-7126-1-skip-noop-save
branch
from
September 14, 2026 23:39
fdbfee5 to
bbceccb
Compare
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.

Changes
Part 1 of 4 of a stack (TAM-7126) that stops mobile sync scanning the whole database on every run; context in TAM-7089 items #1 and #8.
A zero-record incremental pull currently still creates the snapshot table, opens the write-locking save transaction and runs the dependency sort and the whole-database foreign key check inside it, every five minutes. Most syncs on a settled device are exactly this case. This change returns early and only advances the pull cursor (which must still move to
pullUntil, otherwise the next session re-asks from the old tick).Stack: this → #11093 → #11094 → #11095.
Auto-Deploy
Options
Tests
Review Hero
.github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.Remember to...