iOS Couchbase Slow Read Speeds

I am using couchbase lite swift version 2.5.1, and I am seeing slow read speeds. I am making 95 reads one after another and each reach is averaging 0.003 seconds each. The database has 100 entries, and each entry is a flat object with 10 properties. I am reading the objects by id. When reading I am converting each document to a dictionary.

Sometimes I will get very good times, but most of the time it looks to be pretty consistently average 0.003 seconds a read. It kind of looks like the to dictionary conversion is the time sink, but it is hard to tell. Is there anything I can do to speed things up?

Couchbase’s speed is 300x slower than a memory dictionary.


Converting Document to Dictionary could take time as it will need to deserialize all the fields from raw data to Dictionary. Is it possible to work on the Document itself instead of converting it to Dictionary?