This makes all the previously blocking sync calls async, and I also drive-by'ed the $in optimizaiton (STITCH-2585).
I did not yet do the optimization that sets is stale for a whole namespace rather than per document, so this will still be relatively slow on disconnect/reconnect until that optimization is made.
I've also moved the CRUD operations from Sync.swift into a Sync+CRUD.swift to keep the files small.
This makes all the previously blocking sync calls async, and I also drive-by'ed the $in optimizaiton (STITCH-2585).
I did not yet do the optimization that sets is stale for a whole namespace rather than per document, so this will still be relatively slow on disconnect/reconnect until that optimization is made.
I've also moved the CRUD operations from
Sync.swift
into aSync+CRUD.swift
to keep the files small.