MongoDB Realm syncing size

Is it ok that initial syncing size for application is constantly increasing? For example i have sync cluster with approximate size of all collections 12mb. However in application realm sync currently downloads about 60mb of data when application installed first time. And this size is increasing. I have some functions running frequently and making changes in database. But overall cluster database size which syncing is not increasing.

So this is not clear for me, why syncing size is always increasing. I understand that old users receive updates on database changes. But why it affects new users? In that case after few months new users of my application will need to download 100mb of data just to start working with app.

1 Like

@Mikhail_Mulyar Realm Sync stores a history of operations that has occurred on the state so that we can deliver conflict free state - see writeup here -

We do have a Compaction feature that will prune unneeded changesets from the history. You can request this feature be enabled on Realm Sync app by opening a support ticket

I should say that It makes Realm sync to look quite unusable in long term perspective. If sync size will always grow up, then at some point new users will not be able to use application because syncing will take too much time. In perspective of new users it will look not good. Does new user need to download all changeset history which was done before? Isn’t latest version is enough for it?

@Mikhail_Mulyar Yes - this is why we released the compaction feature - to improve the performance of new users. We will also building a new flexible syncing api that will enable users to download the latest version instead

Ok, thanks! And why this feature is not available by default, is it still in development?

@Ian_Ward I have confirmation that Compaction feature have been enabled for my Realm app. However i can’t find where to activate/control it. Can you describe where it is located in UI or is it working somehow automatically?

It works automatically - no user configuration is needed right now

@Ian_Ward and is it one time action or it will execute compaction again after some time period?

it executes at regular intervals and is non-disruptive to your sync workload

1 Like