SqlCeReplication: using ReinitializeSubscription before each Synchronize?

280 Views Asked by At

I'm working on a bug in a legacy Windows Mobile 5 app, which uses SQL CE Replication to sync a SQL CE database with a SQL Server 2005 or 2008 database (using Merge replication).

There is some behavior in the application which I don't believe is related to the bug, but I was curious what the side-effects of it might be. The code ends up calling "ReinitializeSubscription(true)" on the SqlCeReplication object before it calls Synchronize. The "true" flag just tells the reinit to upload any changes before reinitializing, which is fine. I don't believe there is a concrete reason to reinit the sub each time, but that's what it does...

What is the impact of calling ReinitializeSubscription on the SqlCeReplication object before each Synchronize call? Is it just a performance hit, or is it actually doing something different with the data synchronization, compared to not calling ReinitializeSubscription before Synchronize?

1

There are 1 best solutions below

0
On BEST ANSWER

Unless you are experiencing major client íssues, do not reinit each time you sync, that will download the entire client database (after uploading changes), and consume time and bandwidth, and give a poor user experience (unless you data set is very small and you have high bandwidth, of course)