We have an application which needs 40,000 documents to be shared between server and mobile, each document is not bigger than 1Kb.
The download time of 15,000 documents from server to mobile is 20 minutes, when downloading each document. 40,000 documents will be about 50 minutes.
Is there any way to decrease the downloading time?
Maybe setting up multiple threads use on the Android / Phonegap SDK?
Hideki would be the best person to answer this as he’s put a lot of work into replication optimizations for Android … but he’s on vacation till the week after next.
I don’t think multiple threads will help, but I don’t work on the Android version so that’s just a guess.
In the meantime you could help diagnose this by using some sort of CPU profiling to find where the bottleneck is.
Hi @faguirre, are these documents user specific? If not, why don’t you bundle them with your application. You can use a pre-populated bucket in your app and sync only the new revisions. Let’s say you ship the app with 40000 documents and in one week you create 1000 more, the new clients will have to sync only these 1000
Hi @vladoatanasov, those documents are global to all clients. That is a good option to try, how can we extract or bundle the couchbase lite database? is there any link or documentation to use? do we have to bundle those documents manually?
Solution that @vladoatanasov suggested is good solution for static or semi-static contents. If you are using couchbase-lite-android, followings are information. If you are using Couchbase Lite PhoneGap plugin, I can not guarantee if this solution works.
Hi @faguirre, you can follow @hideki’s documents and also take a look at the small example we provided in github. We are using this technique for our app, we also have quite a lot of semi-static data, so shipping it with the binary helps a lot. This way your clients can start using the app immediately after the download and you don’t lose the flexibility of having control over the document revisions