Sync process is very slow RRS feed

  • Question

  • Hello,

    I am experiencing what I believe to be are very slow sync times.  I am averaging 7 minutes to complete a sync of 41 EMPTY tables, bidirectionally.  With 12 empty tables bidirectionally I get 2 minutes.  We are planning on eventually syncing approximately 100 tables.  Are these times to be expected?  I am also using the Sync Services mobile hotfix release in hopes of improving the times but havent seen much difference.  The slowdown appears to be on the UploadingChanges and DownloadingChanges when I look at the SessionProgress events on the client.

    My setup:
    Windows Mobile 5 device.
    WCF Service on Win 7 system
    SQL 2008 DB on same Win 7 system.
    Mobile device is cradled to this Win 7 system.
    Thursday, January 14, 2010 5:23 PM


All replies

  • Hi Andrew,

    Check this forum's announcements and look at "Sync Services for ADO.NET for Devices performance Hotfix is now available" thread,


    José Miguel Torres
    Monday, January 18, 2010 11:38 AM
  • So you dont repeat the time I spent searching for the link :

    Tuesday, January 19, 2010 5:47 AM
  • I have previously tried that Hotfix and that doesnt seem to correct the problem.  I have even went as far as removing the Sync Services cab installation from the mobile, verified that the Sync Service dll's were not still installed in the mobile GAC and explicitly copied the following dll's into the application directory:

    Microsoft.Synchronization.Data.dll - V 1.0.11506
    Microsoft.Synchronization.Data.SqlServerCe.dll - V 3.5.11506

    These should be the hotfix versions of the files.  The server side dll's were not updated in the hotfix is this correct?  Other than that, still having the same issues.
    Tuesday, January 19, 2010 2:33 PM
  • Any other ideas?  It is taking roughly 14 - 16 minutes to sync 104 tables without any data in them.  Performance does not seem to improve with additional syncs either as the hotfix mentions.
    Tuesday, January 19, 2010 5:23 PM
  • Are you using batching??

    If so try drop batching and check again. ON the other hand, wich sync mode are you using? donwload, upload, bidirectional...
    José Miguel Torres
    Wednesday, January 20, 2010 11:15 AM
  • No batching is not being used and all tables are set to bidirectional.
    Wednesday, January 20, 2010 3:35 PM

  • During the sync process, the SqlCeClientSyncProvider.SyncProgress event is fired.  When this is triggered the SyncProgressEventArgs.SyncStage goes from GettingInserts to GettingUpdates to GettingDeletes.  The first two seem to pass fairly quickly, the last one, GettingDeletes, appears to take significantly more time to complete. 

    This all occurs while the SyncStage of the SyncAgent.SessionProgress is UploadingChanges.  The DownloadingChanges SyncStage seems to take an equal amount of time as the UploadingChanges stage.  So whatever is causing the slowdown may be occurring on both upload and download.

    What could cause this or how can I troubleshoot this?
    Wednesday, January 20, 2010 9:06 PM
  • Still have not made any headway with this.  Any other ideas?
    Wednesday, January 27, 2010 6:41 PM
  • This is a one unknown issue when doing Upload on device.

    The recommended solution is to only uploaded tables which had local changes since last sync.  For example, the device is supported to synchornize 10 tables with a server.  However from last sync, only 3 of the local tables has INSERT/UPDATE/DELETE therefore in the next sync, the Sync Application should be able to add 3 tables to the sync group for sync instead of adding all 10 tables.

    Also as a best practise, any reference/lookup table on the device (which means the device user is not supposedly to touch) should have download only sync direction instead of bi-directional.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, January 28, 2010 6:43 PM
  • This is a Known issue.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, January 28, 2010 8:35 PM
  • Is this still a known issue, 2 years later?  Or, is there a fix I'm unable to find?

    I had a requirement to implement Sync Framework for a client using WPF client applications with LocalDataCache and a central SQL 2008 R2 server.  I was able to implement this however we notice that there is a unacceptable delay during the SyncProgress between SyncStage GettingDeletes and SyncStage ApplyingInserts.  Otherwise, all other sync stages happen quickly.  I've used SQL Profiler to monitor the Remote server and there is nothing going on during this significant delay.  Once the first request comes in to apply changes, all goes very quickly.  What is happening between SyncStage.GettingDeletes and applying changes that takes so long?  For 1 row of data it can take 2-3 minutes...  For 10 rows, 10-15 minutes...  

    I appreciate any direction you (or anyone out there) can provide to get us past this.  

    Best Regards,

    Wednesday, March 21, 2012 2:40 PM
  • try this, the concept should apply even if youre not using a mobile device:

    Synchronization Services for ADO .NET for Devices: Improving performance by skipping tables that don’t need synchronization

    if you have plenty of changes, you may try the DataSetSurrogate approach

    Sync Framework WCF-based Synchronization for Offline scenario – Using custom dataset serialization

    Wednesday, March 21, 2012 11:56 PM