Hi,
I am trying the new beta SDK. I am following this tutorial which is the current one -
http://docs.couchbase.com/couchbase-lite/cbl-android/cbl-android-1.0b2/
I was trying to insert 500 docs into the DB by doing this
//insert 500 objects
for(int i = 0; i < 500; i ++)
{
// create an object that contains data for a document
Map<String, Object> docContent = new HashMap<String, Object>();
//put some value
docContent.put(“message”, “Hello Couchbase Lite Hello Couchbase Lite Hello Couchbase Lite Hello Couchbase Lite Hello Couchbase Lite Hello Couchbase Lite”);
docContent.put("creationDate", currentTimeString);
// create an empty document
Document document = database.createDocument();
// write the document to the database
try {
document.putProperties(docContent);
} catch (CouchbaseLiteException e) {
Log.e(TAG, "Cannot write document to database", e);
}
}
It takes me around 14 secs to insert 500 docs. I feel this is slow. 500 docs is a typical data to insert if u creating a News App or any application based on feeds.
Is there anything I am doing wrong or how can we improve the situation ?