How does indexes work on CB Lite

Couchbase Lite does not have async indexing. All of the indexing is done synchronously by the underlying engine. It either happens all at once when an index is added after documents, or the indexing happens per write when documents are added after an index. I think the performance hit is coming from somewhere else, but without some profiling there is no way to say where.