While doing pull replication the UI is strucking

134 views
Skip to first unread message

PRASANNA KUMAR

unread,
Nov 14, 2014, 8:10:35 AM11/14/14
to mobile-c...@googlegroups.com
Hi All,

I have been working the android couch base lite in android.

The pull replication is very slow than comparing with ios and ipad!!

I am working with around 20,000 documents in database each document would be 10 to 20mb based on attachments.

While doing replication from server the pull replication is very slow and also  because  of the replication in background my UI components(when click on) actions are not happening immediately taking time 25sec time in between.

Questions :

1) I think While doing pull replication from server the entire CPU scheduling taking for replication in background, how i can stop that ?
2) And also am using android AsyncTask for background replication, is there any way to achieve the replication in background with out effect to UI ?

please let me know if you need any furtherer information.

Thank you all in advance.
 

Traun Leyden

unread,
Jan 8, 2015, 8:29:50 PM1/8/15
to mobile-c...@googlegroups.com

--
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 mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/37af386b-9b97-462e-be23-0dde216eb8f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hideki Itakura

unread,
Jan 27, 2015, 12:42:54 AM1/27/15
to mobile-c...@googlegroups.com
Hi Prasanna Kumar,

Sorry for late reply. We are currently investigating general performance of pull replication for Android device.

Some questions about your environment:

>> I am working with around 20,000 documents in database each document would be 10 to 20mb based on attachments.

It seems 200GB - 400GB of data on your server. I believe your app downloads part of all documents. How many document could be replicated to each Android device? And How long does it take to download all documents to Android device?

Answer for your questions:

Questions :

>> 1) I think While doing pull replication from server the entire CPU scheduling taking for replication in background, how i can stop that ?

You can stop replicator by calling stop() method. Replicator does not stop immediately, it stop after currently processing HTTP requests. 

>> 2) And also am using android AsyncTask for background replication, is there any way to achieve the replication in background with out effect to UI ?  

We are using ScheduledExecutorService for Replicator for asynchronous tasks including replicator. 

Currently Thread priority is default. If you can compile Couchbase Lite for Android by yourself, you can modify thread priority by modifying Manager.java

Please let us know if you have any further questions.

Thanks,
Hideki
Reply all
Reply to author
Forward
0 new messages