Uploaded image for project: 'Realm Java SDK'
  1. Realm Java SDK
  2. RJAVA-318

ProgressListener updated very infrequently

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Goal

      I want to monitor the progress of the first time a fully synchornized realm is downloaded from the server. My realm file size is about 2MB and downloading it takes about 12 seconds on my old Google Nexus 5X.

      Expected Results

      Download progress should be updated frequently so I can show the progress to the user.

      Actual Results

      Download progress is zero the first 10 seconds, then a progress update a couple of times the last few seconds

      Code Sample

      val realm = Realm.getDefaultInstance()
      syncUser.allSessions().forEach {
           it.addDownloadProgressListener(ProgressMode.CURRENT_CHANGES, progressListener)
      }
      doAsync {
          try {
              syncUser.allSessions().forEach {
                  it.downloadAllServerChanges()
              }
          } finally {
              uiThread {
                  realm.close()
              }
          }
      }
      
      

      Version of Realm and tooling

      Realm version(s): 5.2.0

      Realm sync feature enabled: yes

      Android Studio version: 3.1.2

      Which Android version and device: Nexus 5x, Android 8.0

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: