Performance of SqlCeClientSyncProvider RRS feed

  • Question

  • I have a project using sync services for ado.net, and albeit I enjoy using sync services, I’m having some performance issues. For example agent.Synchronize() takes several seconds even when there is no changes (and the time is spent on the client, the web service returns its GetChanges result in <100ms)

    In this post, http://blogs.msdn.com/matt/archive/2008/09/09/sql-ce-3-5-with-linq-to-sql.aspx , Matthew Manela show that implementing a per-thread SqlCeConnection-pool greatly improves performance for queries against a SqlCe database, because of the huge cost involved in opening and closing a SqlCeConnection. Basically, he creates one open SqlCeConnection per thread and keeps it open for the entire lifetime of the application.
    In my project, performance increased >300% after implementing his suggestion.

    So I was wondering if the same principle could be used by SqlCeClientSyncProvider. Looking at it in reflector, I can see that it closes its SqlCeConnection in EndTransaction, so during a agent.Synchronize() a lot of SqlCeConnections will be opened and closed.


    • Moved by Hengzhe Li Friday, April 22, 2011 7:56 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, November 3, 2008 8:45 AM