On Sep 18, 2015, at 3:34 AM, Ragu Vijaykumar 
<r...@lumobodytech.com<mailto:r...@lumobodytech.com>> wrote:

I'm trying to save rapidly changing data into a CBLModel which has autosave on, 
as I need it to save as often as it can whenever the data changes. However, I 
do not need revisions saved everytime I update the model.

We’ve brainstormed this a bit, but there’s no ability to do that yet. It gets 
complex because revisions are by design immutable, so changing a document does 
require creating a new revision.

Is there a way to prevent revisions from being saved (currently, the database 
size is growing huge due to the large number of revisions when I'm only 
interested in the most current save), and instead have the same trigger an 
overwrite of the document? I already set maxRevisionTreeDepth = 1, and know I 
can compact, but this takes time.

You could use ForestDB storage instead of SQLite; then the revision-tree 
compaction is incremental and happens on every save, so you won’t get this 
bloat.

I don’t know how important replication is to your app, but the frequent pruning 
of old revision-IDs will lead to false conflicts if multiple clients are 
updating the same documents. There won’t be enough information in the revision 
tree to determine whether updates from different clients are part of the same 
chain or not.

—Jens

-- 
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-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/4CB1817D-F7FC-4B82-B6CC-68383A71BA09%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to