Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch writing of records to SQLite store #498

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

AnthonyMDev
Copy link
Contributor

This uses insertMany to batch the writing of records to the SQLite cache. Previously we were running separate DB transaction/query for each individual record written. This should significantly improve performance of File I/O for cache writes.

We are investigating utilizing the Benchmarks package at some point in the future to measure the performance improvement, but that project is blocked for now and we should still release this performance improvement in the mean time.

Copy link

netlify bot commented Sep 30, 2024

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit c71a8bc
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docc/deploys/66fb317ddf757c00088ff9a9

Copy link

netlify bot commented Sep 30, 2024

Deploy Preview for eclectic-pie-88a2ba canceled.

Name Link
🔨 Latest commit c71a8bc
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/66fb317da9d4a9000883862c

Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, thank you!

It's worth noting for anyone reading this later that this isn't batching updates from different operations. The bounds of the update are still for a single operation.

@AnthonyMDev AnthonyMDev merged commit f70a910 into main Oct 1, 2024
36 checks passed
@AnthonyMDev AnthonyMDev deleted the sqlite-batch-write branch October 1, 2024 17:27
BobaFetters pushed a commit to apollographql/apollo-ios that referenced this pull request Oct 1, 2024
BobaFetters pushed a commit that referenced this pull request Oct 1, 2024
8e4cbf79 Batch writing of records to SQLite store (#498)

git-subtree-dir: apollo-ios
git-subtree-split: 8e4cbf79b73d1c507a8755bc4dc177576c87b534
BobaFetters pushed a commit that referenced this pull request Oct 1, 2024
git-subtree-dir: apollo-ios
git-subtree-mainline: 6ca3c07
git-subtree-split: 8e4cbf79b73d1c507a8755bc4dc177576c87b534
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.

2 participants