Select to view content in your preferred language

Does AGSGDBSyncTask syncGeodatabase block?

4788
7
10-07-2014 11:30 AM
KristofferStenersen
Regular Contributor

Hello world,

In the OfflineFeatureEditingSample, the syncGeodatabase method is called from the main thread (IBAction from Storyboard).

In our app, we have a fairly large dataset to sync (12 tables with some 100k´s of features), and we see that, as the size of the dataset increase, the UI blocks for longer periods of time. At this point, the call seem to block about 15 seconds. This is a critical issue for us, as the app triggers sync at regular intervals. With smaller datasets, this has not been an issue with the current code.

We´ve tried posting the operation on a background thread (dispatch_async/performSelectorInBackgorund), but then the we do not get status or completion callbacks.

Please advice:)

Kristoffer

0 Kudos
7 Replies
DavidLednik
Frequent Contributor

Hi Kristoffer,

Which version of SDK are you using?

0 Kudos
KristofferStenersen
Regular Contributor

Hi David,

I´ve just verified that the issue persist on 10.2.4.

Thanks,

Kristoffer

0 Kudos
DavidLednik
Frequent Contributor

Hi Kristoffer,

let me check on my side. I don't think this call should be blocking the UI.

I'll try to find a large dataset for the test.

Regards,

David

0 Kudos
KristofferStenersen
Regular Contributor

Hi, Thanks for looking into this.

A (perhaps) related issue: We also experience, that on this large offline gdb, the first edit is very slow - the [agsgdbfeaturetable save:agsgdbfeature error] takes about 5-15 seconds. The following edits are fast.

On the edit operations though, we´re able to run the operation in background threads, to not block ui. But on the synchronization operation we do not get callbacks running on background threads; ui blocks. 

0 Kudos
DiveshGoyal
Esri Regular Contributor

This will be fixed with the upcoming 10.2.5 release

KristofferStenersen
Regular Contributor

Thanks Divesh. Can´t wait to get it:)

0 Kudos
KristofferStenersen
Regular Contributor

Hi, we´re still seeing a delay on 10.2.6. It´s better though: Down from 60 to about 10s in my current setup.

0 Kudos