Select to view content in your preferred language

Synchronization blocks the UI thread when applying deltas

1357
1
08-30-2016 07:24 AM
ChristopherMilack1
Regular Contributor

When I attempt to sync and have a large number of deltas from the server, the UI thread is blocked and becomes unresponsive. For a delta geodatabase that is  ~20 MB, the block lasts well over a minute and for ~37 MB (the largest I've tested), it lasts closer to 5 minutes. Even when I have a small number of deltas, the UI freezes for a few seconds. We're currently using version 10.2.5 of the SDK and have tested with ArcGIS Server 10.3.1 and 10.4.

I've verified in instruments and it appears that this entire process (of applying deltas) runs on the main thread. I've attempted to kick off the sync task on a background thread using both GCD and NSOperations, but in both scenarios, my status/completion blocks do not get executed. Looking at the stack trace, I get the sense that even if that did work, the SDK is explicitly kicking back to the main thread to apply deltas.

This lockup seems to have gotten worse in recent months and I'm not sure if that is the result of the increased amount of data in my system or some other external factor. I tried removing indices on a few of the tables that had the largest number of edits (one had 45,000 edits that needed to be applied) and that made no difference.

I know there were similar threading issues with 10.2.4 but they were supposed to be fixed. Has anyone run into this with this latest version (10.2.5) and had success with any performance optimizations? I've found a number of ways to speed up SQLite execution but I'm cognizant of the fact that changing those settings could interfere with the SDK.  Any insight would be appreciated.

0 Kudos
1 Reply
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Christopher,

Just based on your description, we have a similar known-limitation bug that we mentioned in this link, please feel free to check it out: 

BUG-000094242: The user interface is locked during the pre-processi..