Couchbase Mobile (ios) replicated data size too large

192 Views Asked by At

I am working on a mobile game that uses Couchbase mobile on the client and Iris Couch to store data on the cloud. In order for the app to work off line each user has a database on the server which is replicated on the device. Everything looks promising except for one detail: when the data is replicated on the deice it takes too much disk space. For example, a remote database contains 400 documents and it is approximately 100 MB, the replicated database on the device is approximately 390 MB with the same number of documents. Has anyone experienced such issue? Any help would be appreciated.

1

There are 1 best solutions below

0
On

TouchDB stores data in a completely different format than CouchDB — it actually writes into SQLite tables. Another factor that may be coming into play is the lack of snappy compression on the TouchDB side, which CouchDB recently added and significantly decreased its on-disk requirements.

Considering your documents seem to be relatively large, I suspect that the difference you are seeing may be mostly compressed vs. raw related. You could try filing a feature request for similar compression to be implemented on the TouchDB project if you can determine that this is indeed where the difference is coming from.