Slow Initial Sync

Hello, when a mobile client first connects to our app and tries to sync, we are seeing (wall clock) timings of > 1min for only 20k records.

Our models are based on the admin panel generated code:

class Bar: EmbeddedObject {
    @objc dynamic var key: String?
    @objc dynamic var value: String?

class Foo: Object {
    @objc dynamic var _id = ObjectId.generate()
    @objc dynamic var _partition: String = ""
    @objc dynamic var value: String = ""
    @objc dynamic var anotherValue: String = ""

    let list = RealmSwift.List<Bar>()
    let anotherList = RealmSwift.List<Double>()

list (Bar) never has more than about 2 values. anotherList (Double) never has more than ~500.

Is > 1min normal?

@MagnifcoSpecifico: Do you have an android client app as well and if yes are you facing a similar problem there also?

Hi @Mohit_Sharma I do not. It’s an iOS mobile client only.

Hi @MagnifcoSpecifico – what size of Atlas database cluster are you using for this app?

Is this using real hardware or a simulator?

How are you checking the elapsed time for the initial sync?

Do you need to work with all 20K objects at the same time, or could you use partitioning to just sync the objects you currently care about?

Hiya @Andrew_Morgan

It’s using an iPad Pro 2020.
I’m measuring the elapsed time with a stop watch.
My start/stop is based on progress.fractionTransferred as reported by the SDK.
These objects do come from a partition of a larger data set. In our use case, our final scenario will look more like 60k objects in a partition.
We are trialling on a M0 Sandbox (Shared RAM, 512 MB Storage).

On the face of it looking at the docs here and here that a large part of my Q is answered by the tier we are using to evaluate. But it wasn’t clear to me by how much the performance gains would be on the higher tiers.

Is there a back of napkin calculation I could apply to figure out M0 vs M10 vs M30 performance increases?


We swapped to an M10. Performance is acceptable.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.