Skip to content

perf(sync): read each collection once per pull page, not once per record - #384

Merged
kYem merged 2 commits into
mainfrom
kes/eng-153-sync-a-pull-re-reads-the-whole-collection-for-every-record
Oct 4, 2026
Merged

kYem merged 2 commits into
mainfrom
kes/eng-153-sync-a-pull-re-reads-the-whole-collection-for-every-record

Conversation

@kYem

@kYem kYem commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Fixes ENG-153

resolveAndApply read the whole collection for every pulled record, so a page of N records cost N full reads. Each page now reads a collection once (LocalCopies on PullState) and mirrors the pull's own writes into it. It re-reads per page, so an edit landing mid-listing is seen within a page.

The 500-plus-record paging tests drop from ~230–460ms to ~40–80ms locally, so the 30s timeouts from #383 are removed.

@kYem
kYem merged commit 4d2f9a9 into main Oct 4, 2026
10 checks passed
@kYem
kYem deleted the kes/eng-153-sync-a-pull-re-reads-the-whole-collection-for-every-record branch October 4, 2026 03:38
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