> On Nov 13, 2014, at 12:41 PM, Chris Fuentes <[email protected]> wrote: > > Is the replication running on the same thread that the CBL manager instance > is tied to?
No. There's a single background thread, created by CBL, that's reserved for replication, view updates and async view queries. > If that's the case, then perhaps the replication activity is simply blocking > reads to the database, which are blocking UI actions? Normally I'd assume > reads of a single doc by ID to be imperceptibly fast, but there are > noticeable UI lags whenever replication seems to be occurring. SQLite has some limitations on concurrency. While one connection (thread) has an active transaction, no other connection can read or write from the database. This is probably what you're seeing. (It's also a major reason we're switching to ForestDB, which doesn't have this limitation.) If you can pause the app in the debugger while the UI thread is blocked, you should be able to see which other thread is using the database and what it's doing. That would really help diagnose this. —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/9F9100E0-6405-46AF-BCD4-B5969AAF9F4F%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
