What is the size of database created by couchbase for android?

Hi,

i am new to couchbase lite, and started up with android,
after playing with it, i have looked at the app size, and saw it growing to several MB very fast,
What is the size usually used by the database and documents created? my objects contain between 3 to 10 parameters

Another question, my application will use around 70-80 documents for each game session, and there might be lots of documents in around 6 different types, so my question is how scalable couchbase lite for android and iOS is?

Thank you
Adi

Hey @adic,

The additional size for Couchbase Lite within your app should be in the KB range and the size of the database depends on the content of the documents but there is no maximum capacity that the database can have other than the size of your filesystem.

Couchbase Lite is scalable where you can determine what documents to replicate down to your client through the use of channels and accordingly can design logic around your game play.

Thanks,
William

Thank you for your respond, i will read about channels,

What i meant when asked about the size, is how much approximately each document takes and the database itself, is there overhead for the database and each document?

Since currently i have 47 documents in the DB, and when i look the app info, i see the Data section on 2.08MB which feels a bit big… text wise its not big json files.

Regarding scaleable, i assume that after some time, the local database on the device will contain around 10000 documents, most of them of one type, and was wondering how much it will affect the performance of the app.

Thank you in advance!

when i look the app info, i see the Data section on 2.08MB

Can you look at individual files to see what’s taking up space?

Couchbase Lite stores the JSON data of documents, plus attachments. It also stores the recent revision history (which doesn’t take up much room, maybe a few hundred bytes per doc.) And it stores the latest past revisions, or conflicts, of documents; those will get cleaned out if your tell the database to compact. So if you have a small number of docs but update them many times, you may see more storage used than you expect, but compacting will bring it back down.

It all depends on the size of your documents. There is very little that Couchbase Lite adds in addition besides a few bookkeeping properties on the JSON. That metric will show the data usage for the entire app, not just the database file as well. 10000 documents is not that many and should not affect the performance of the app. iOS, for example, is routinely tested with 1,000,000 documents to gauge performance if I recall correctly.

Thank you for your replies…
it was helpful.