rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.05k stars 37 forks source link

feat: Simplified Dueling Dags - Mutation Recovery - Optimize mutation recovery at startup by reusing client map read by client init. #821

Closed grgbkr closed 2 years ago

grgbkr commented 2 years ago

Problem Mutation recovery regressed our median startup scan benchmark by ~20% (25 ms to 30 ms).

Solution Try to mitigate by reusing the client map read by persist.initClient, rather than reading it in a new IndexedDB transaction.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rocicorp/replicache/7Dsd5hwAYfAUj7KrasdEH5zvTp21
✅ Preview: https://replicache-git-grgbkr-sdd-mutation-recovery-sta-e9096b-rocicorp.vercel.app