couchbase-lite-core icon indicating copy to clipboard operation
couchbase-lite-core copied to clipboard

CBL-6282: Replicator starts up slow for big database

Open callumbirks opened this issue 1 year ago • 1 comments

Cherry-pick 711f886:

Optimize unsorted enumeration of BothKeyStore (#1858)

Use a different algorithm to enumerate a BothKeyStore when the sortOption is kUnsorted: just enumerate the live docs first, then the deleted ones. This removes the need to order the underlying enumerations, which in turn allows SQLite to use indexes when onlyConflicts is set. This should fix CBL-4506

callumbirks avatar Sep 27 '24 16:09 callumbirks

Code Coverage Results:

Type Percentage
branches 68.45
functions 80.11
instantiations 33.97
lines 79.02
regions 76.23

cbl-bot avatar Sep 28 '24 18:09 cbl-bot