Forums - C# Corner

Forum guidelines

Microsoft Synchronization Framework

Dec 4 2012 4:22 AM
Guys, I'm writing a small app that syncs two folders, one on the local PC and one on a network share. I have this function working but my problem is I feel it is taking far too long.

I will admit the data size is about 100 Gig to snyc but the last snyc took about 14 hours, would this be expected? I thought the whole idea of snychronizing was to only edit files that have changed.

as an example the function that calls in my code is below as maybe i am doing something wrong:

                   string folderA = textBox1.Text;
                   string folderB = textBox2.Text;

                    FileSyncScopeFilter scope = new FileSyncScopeFilter();

                    FileSyncProvider providerA = new FileSyncProvider(Guid.NewGuid(), folderA);
                    FileSyncProvider providerB = new FileSyncProvider(Guid.NewGuid(), folderB);


                    SyncOrchestrator agent = new SyncOrchestrator();
                    agent.LocalProvider = providerA;
                    agent.RemoteProvider = providerB;
                    agent.Direction = SyncDirectionOrder.Upload;
                    label2.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm");
                    label2.ForeColor = Color.Red;