Long processing time when compare 2 file words (API .NET)

Hello,
I am developing a tool using the GroupDocs.Comparison for .Net. We have a Develoment OEM license.I am using the below sample code and the latest GroupDocs.Comparison DLL version.

I am testing 2 file words:

  • 797 page word (~11MB) document that I made 5000 changes to. The comparison takes about 3 hours.
  • 917 page word (~8M) takes about 1.5 hours.

Our customers are complaining about this problem. Please help me to fix it.

Source code

class CompareDocumentsFromPath
{
public static void Run()
{
string outputDirectory = Constants.GetOutputDirectoryPath();
string outputFileName = Path.Combine(outputDirectory, Constants.RESULT_WORD);
using (Comparer comparer = new Comparer(Constants.SOURCE_WORD))
{
comparer.Add(Constants.TARGET_WORD);
CompareOptions compareOptions = new CompareOptions()
{
MarkChangedContent = true,
DetectStyleChanges = true,
ChangedItemStyle = new StyleSettings()
{
FontColor = System.Drawing.Color.Yellow,
IsUnderline = true,
},
InsertedItemStyle = new StyleSettings()
{
FontColor = System.Drawing.Color.Blue,
IsUnderline = true,
},
DeletedItemStyle = new StyleSettings()
{
FontColor = System.Drawing.Color.Red,
IsStrikethrough = true,
},
};
comparer.Compare(outputFileName, compareOptions);
}
Console.WriteLine($“\nDocuments compared successfully.\nCheck output in {Directory.GetCurrentDirectory()}.”);
}
}

1 Like

@FPT008

Could you please share the problematic files? We’ll then investigate this scenario at our end. Also please share the development environment details (e.g. OS, .NET version).