slow during pull replication

In CouchbaseLite for Android (v 1.3.1) when I call the method, it takes between 200 to 979 milliseconds to return, while pull replication is taking place at the same time. I’m querying a single document (startKey = endKey) with an all-docs query:

LiveQuery liveQuery = database.createAllDocumentsQuery().toLiveQuery();

liveQuery.addChangeListener(new LiveQuery.ChangeListener() {
            public void changed(ChangeEvent event) {
                //do something with event.getRows()

// This call takes up to 979 ms to return when pull replication is happening at the same time
QueryEnumerator run =;

I observed that if instead of using a LiveQuery I use a simple Query object, the run() method doesn’t take long to return. Is there some kind of blocking/thread-synchronization that cause the method to block the call for very long times when pull replication is happening at the same time?

Tagging @hideki - Weren’t you looking into a similar latency issue this past week? Was that in 1.4?

Hi @everardo.x.vargas_nd

We will track this item with the github ticket. .