Thanks Jens your answer is right to the point.

Since you helped me so much I dare to ask another question.

Since I am not using Couchbase on the backend  I just saw that that Lite 
supports the couchdb replication protocol.

Now I am trying to guess how much work it would be to write an CouchDb 
Replication Protocol Adapter for my custom java backend?

Right now I am doing all the syncing couhbase-lite with a homegrown 
protocol. With /get-documents and /poll-for-changes rest calls.
If you would recommend writing an Replication Adapter, to get me started 
are there any docs or are there any code examples available?

Many Greetings
John

 

Am Dienstag, 13. Oktober 2015 23:45:58 UTC+2 schrieb Jens Alfke:
>
>
> On Oct 13, 2015, at 2:16 PM, [email protected] <javascript:> wrote:
>
> But yet I do need to do this  because I have a dynamic query which is 
> nearly impossible get done with only the query api. (I would need to create 
> a lot of views and merge the results)
>
>
> If this really is a one-shot view that’s just queried once and then 
> deleted, then it might be cheaper just to do the work yourself in memory. 
> That is, you’d run an all-docs query to iterate over all documents, do your 
> mapping logic on each, and collect and sort all the emitted data. This will 
> use more RAM than a one-shot query, but you’ll save all the disk I/O of 
> writing the index and then reading it back in.
>
> Any advice on  how  I can speed up execution of the map function on 
> android? For what should I look out? For example I am calling emit a lot 
> for a single document.
>
>
> Building an index from scratch is inherently expensive — it reads every 
> document from disk, parses it, evaluates the map function, serializes the 
> index rows and writes them to disk. You can profile your app to see how 
> much of the time is being spent in your map function itself.
>
> —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/bdb4c19b-8259-48ca-89e8-62593fcee31a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to